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 scene tree selection #91430

Closed

Conversation

Hilderin
Copy link
Contributor

@Hilderin Hilderin commented May 2, 2024

This PR should fix #91254 and fix #91411

I tried to modify as little code as possible while maintaining the fix for #90636

The problem was caused by the addition of SceneTreeDock::get_singleton()->set_selection in the editor_node. Modifying the editor_selection from outside the SceneTreeDock seems causing a lot of problem so I just update the scene selection when moving back or forward in the Inspector which was the original bug.

godot.windows.editor.dev.x86_64_0X5QxlZ2MW.mp4
godot.windows.editor.dev.x86_64_A7yHIBuy0Y.mp4
godot.windows.editor.dev.x86_64_NUCtcBJl3w.mp4

@YeldhamDev
Copy link
Member

Alternatives to this PR: #91435 & #91439

@akien-mga
Copy link
Member

CC @ajreckof

@ajreckof
Copy link
Member

ajreckof commented May 2, 2024

I feel like this is a band-aid that will make a lot of problems of editor selection not being in sync with the actual selection reappear. Both cases that were reported where for me cases where the code used a function that should have updated selection but was not updating EditorSelection and the code relied on this broken behavior.

@Hilderin
Copy link
Contributor Author

Hilderin commented Jun 1, 2024

I'm closing this PR, I think the other PRs suggested are superior!

@Hilderin Hilderin closed this Jun 1, 2024
@KoBeWi KoBeWi removed this from the 4.3 milestone Jun 1, 2024
@KoBeWi KoBeWi added the archived label Jun 1, 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.

Opening a scene always selects the root node Scene tree drag&drop does not work after delay
5 participants