Merge pull request #42677 from groud/fix_error_on_attach_script
Fix error on attaching script
This commit is contained in:
commit
47e9fc22c7
@ -1762,6 +1762,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
|
|||||||
|
|
||||||
void SceneTreeDock::_script_creation_closed() {
|
void SceneTreeDock::_script_creation_closed() {
|
||||||
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
|
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() {
|
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("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->set_inheritance_base_type("Node");
|
||||||
script_create_dialog->config(inherits, path);
|
script_create_dialog->config(inherits, path);
|
||||||
script_create_dialog->popup_centered();
|
script_create_dialog->popup_centered();
|
||||||
|
Loading…
Reference in New Issue
Block a user