mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-04 00:46:02 +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)
|
item.deselect(i)
|
||||||
|
|
||||||
func tree_deselect_all_but(target: TreeItem, item: TreeItem):
|
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)
|
tree_item_deselect_all(item)
|
||||||
if item.get_children():
|
next = next.get_next_visible()
|
||||||
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()
|
|
||||||
|
|
||||||
var prev_selected_cell
|
var prev_selected_cell
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user