Fix filtered objects getting unselected after reselection and certain properties change#109959
Closed
ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
Closed
Fix filtered objects getting unselected after reselection and certain properties change#109959ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
ryevdokimov wants to merge 1 commit intogodotengine:masterfrom
Conversation
… properties change
KoBeWi
reviewed
Sep 9, 2025
Comment on lines
+1694
to
+1696
| if (filter != p_filter) { | ||
| suppress_filter_removal = false; | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| if (filter != p_filter) { | |
| suppress_filter_removal = false; | |
| } | |
| suppress_filter_removal = (filter == p_filter); |
KoBeWi
reviewed
Sep 9, 2025
| bool display_foreign = false; | ||
| bool tree_dirty = true; | ||
| bool pending_test_update = false; | ||
| bool suppress_filter_removal = false; |
Member
There was a problem hiding this comment.
The name could be improved. Maybe update_selection_from_filter? (with reversed logic)
Member
|
The fix looks very hacky. The issue boils down to SceneTreeEditor changing EditorSelection when it shouldn't. E.g. updating configuration warnings will cause tree update, which calls filter update and deselects nodes if they are hidden. tbh deselecting filtered out nodes seems so pointless now. What's the point if you can click the node in the viewport and it will be selected anyway, despite being invisible in the tree view? I wonder if we shouldn't just always keep the selection, so like #109963, but not optional. |
Member
|
Superseded by #114569. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a somewhat weird issue that I can only reliably reproduce in certain circumstances but sometimes can reproduce when just changing transforms for instantiate scenes. The fix is to suppress the filter removal unless the filter changes, to allow reselection without issues.
An example (note the conveyor getting unselected after I change the size property):
2025-08-25.17-43-01.mp4
With this PR the conveyor remains selected.