-
-
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
Tree node should have select()/deselect() functions #20548
Comments
get_select() is not updated in /~https://github.com/godotengine/godot/blob/master/scene/gui/tree.cpp#L3077 |
@AlexHolly Did you mean to make a new issue? This is a feature proposal, not a bug report; I don't think bugs should be reported on a feature proposal. |
Do you think it should be updated? I would make a PR and fix both. |
@AlexHolly If you'd like to try, go for it. I'd be up for it. Also, I see your reasoning now for the bug report being here, instead of in its own issue -- my bad! |
Is there something I'm missing here? I have a situation where my Tree might need to be reconstructed. In that situation, I would like to be able to modify the selected item, but that seems to be impossible to do via GDScript. So is there no way at all to change the visually selected item through GDScript alone? |
Yeah. It seems to be impossible to select a TreeItem via GDScript. Is it because the Editor doesn't use such feature? It would be very convenient actually. |
@radlotus It look like methods Can you clarify if this is the functionality you were looking for? |
The method Tree.deselect_all() doesn't deselect the root TreeItem (Godot 4 Beta 12). |
I feel like this one is self-explanatory. My reasoning for this is that using TreeItem.selected doesn't update the Tree's get_selected() result, which turned into me having to make my own selected_item variable just so I could make it
null
whenever I don't have an item selected.On that note, it would also be useful to allow deselecting all TreeItems whenever whitespace is clicked. It's not that hard to deselect all in GDscript, but I feel it'd be welcome as an option.
The text was updated successfully, but these errors were encountered: