-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add is_visible_in_tree
in TreeItem
#88300
Add is_visible_in_tree
in TreeItem
#88300
Conversation
31b4b56
to
8b276fb
Compare
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.
Documentation is just fine
This bugfix makes sense. is_visible_in_tree
, akin to CanvasItem and Node3D is likely to benefit many and the internal editor code for things like the Scene Tree dock.
However, there's now 3 (possibly more?) Objects that share this similar snippet of code. I don't know if that's going to be a good thing in the long run.
8b276fb
to
2121fca
Compare
2121fca
to
50cf7e1
Compare
Thanks! |
Addind a member
is_visible_in_tree
inTreeItem
, which returnstrue
if the item and all its ancestors are visible.This fixes #88251
Each
TreeItem
, after visibility changes, propagate its state to its children.Some uses of
TreeItem::is_visible
are replaced by the newTreeItem::is_visible_in_tree
(I did my best to analyze which ones should be replaced or not).Tested with the minimal repoduction project attached to the corresponding issue #88251
Here is a slightly modified version, where we can turn on and off the visibility of some
TreeItem
with keyboard (1 to 9 normal and numpad keys)Tree Item-is_visible_in_tree.zip
Video captures :
(master)
TreeItem.-.is_visible.bug.mp4
(fix)
TreeItem.-.is_visible.fix.mp4