Skip to content
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 not being able to reopen signals panel immediately after connecting a signal #93110

Merged

Conversation

Hilderin
Copy link
Contributor

Fixes #92996

The issue was that last_valid_node was being set to null when p_node was null, causing the loss of the last valid node. After a signal connection, restore_last_valid_node is called, but last_valid_node no longer contained the node being edited.

@Hilderin Hilderin requested a review from a team as a code owner June 13, 2024 00:57
@akien-mga akien-mga added this to the 4.3 milestone Jun 13, 2024
@akien-mga akien-mga requested a review from KoBeWi June 17, 2024 11:34
@KoBeWi
Copy link
Member

KoBeWi commented Jun 17, 2024

Something is wrong. The Node dock shows the connecting node, but the inspector does not.

iiyWwNaQ5q.mp4

@Hilderin Hilderin force-pushed the fix-signal-panel-after-connection branch from 0f910d1 to b2a362f Compare June 17, 2024 23:10
@Hilderin Hilderin requested a review from a team as a code owner June 17, 2024 23:10
@Hilderin
Copy link
Contributor Author

I changed a couple of things because it's was weird that the NodeDock and Inspector were not working the same way.

I changed the fix that was made from #84530 simply by add the line NodeDock::get_singleton()->set_node(nullptr); in scene_tree_dock.cpp when the node is deleted.
Also, I added a previous_item method in EditorNode so the _add_callback could select back the last node.
That allowed me to remove everything managing the last valid node in NodeDock.

editor/editor_node.cpp Outdated Show resolved Hide resolved
@KoBeWi
Copy link
Member

KoBeWi commented Jun 18, 2024

Note that restore_last_valid_node() was added in #54071 to fix the same issue, but seems like it no longer works correctly for some reason.

@Hilderin Hilderin force-pushed the fix-signal-panel-after-connection branch from b2a362f to 64ba2cf Compare June 18, 2024 22:25
@akien-mga akien-mga merged commit a50b535 into godotengine:master Jun 19, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga changed the title Fix Can't reopen signals panel immediately after connecting a signal Fix not being able to reopen signals panel immediately after connecting a signal Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't reopen signals panel immediately after connecting a signal
3 participants