-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error when closing Attach Node Script window #34478
Conversation
editor/scene_tree_dock.cpp
Outdated
@@ -2616,7 +2616,7 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) { | |||
} | |||
|
|||
script_create_dialog->connect("script_created", this, "_script_created"); | |||
script_create_dialog->connect("popup_hide", this, "_script_creation_closed"); | |||
script_create_dialog->connect("popup_hide", this, "_script_creation_closed", varray(), CONNECT_DEFERRED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it could be CONNECT_ONESHOT
, and then the disconnect
can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force pushed an amend that does that.
I wonder if it's really needed to do these disconnects at all in the first place. The only reason I can think of would be that this
If it works seemlessly to re-connect the signal without having disconnected it first, then we could simply get rid of the disconnect callback. |
Actually each class has a separate instance of |
It seems that's what the code used to do, but it was changed in #30196 by @LikeLakers2 for the sake of editor plugins that call |
@akien-mga I don't remember it ever having multiple instances of That said, I would recommend having multiple Also: If you want to revert my PR (i.e. if it's just easier to implement your own solution than work off of mine) please feel free to do so. Wouldn't bother me. |
1dc33f5
to
f20b3ff
Compare
Thanks! |
Fix #34471