mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-03 16:35:56 +00:00
TreeItem.get_next_visible(...)
seems to iterate through children just fine, so use it for selecting only one item.
This commit is contained in:
parent
45c44352ba
commit
8f9a0cd4d7
|
@ -220,14 +220,10 @@ func tree_item_deselect_all(item: TreeItem):
|
|||
item.deselect(i)
|
||||
|
||||
func tree_deselect_all_but(target: TreeItem, item: TreeItem):
|
||||
if item != target:
|
||||
var next = item.get_next_visible()
|
||||
while next and next != item:
|
||||
tree_item_deselect_all(item)
|
||||
if item.get_children():
|
||||
tree_deselect_all_but(target, item.get_children())
|
||||
var next = item.get_next()
|
||||
while next:
|
||||
tree_deselect_all_but(target, next)
|
||||
next = next.get_next()
|
||||
next = next.get_next_visible()
|
||||
|
||||
var prev_selected_cell
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user