summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorGilles Roudière <gilles.roudiere@gmail.com>2020-10-26 23:26:44 +0100
committerGilles Roudière <gilles.roudiere@gmail.com>2020-10-26 23:26:44 +0100
commit6386bf60ea2882fe28b4ace2c5a4ef7a78e339f5 (patch)
treeed4627c060ebacd9c16c97ae43d2bacff2a73fbf /editor
parentb6707aa35bf6db077456c64c29231465a7c8d3cb (diff)
Fix error on attaching script
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index c4e90ca3ff..46e9cd4676 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1762,6 +1762,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
void SceneTreeDock::_script_creation_closed() {
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
+ script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
}
void SceneTreeDock::_toggle_editable_children_from_selection() {
@@ -2651,7 +2653,8 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
}
script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
- script_create_dialog->connect("popup_hide", callable_mp(this, &SceneTreeDock::_script_creation_closed), varray(), CONNECT_ONESHOT);
+ script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path);
script_create_dialog->popup_centered();