diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 08:25:20 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 08:25:20 +0100 |
commit | 47507a07fd6a08600ca53e084200dda9ac509c89 (patch) | |
tree | 9735145e4539539afc4429bb9e90c3f86fd1ee14 /scene | |
parent | 1bfaa73e140c38b9a7341fdf9d6640df1864a8cd (diff) | |
parent | d4d5df2314208a99c589456a75299a334672acd2 (diff) |
Merge pull request #68546 from marzecdawid/fix-deselect-all-in_tree
Fix errors while deselecting all tree items; issue #65185
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 9e22a414ed..35cc29d080 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4218,7 +4218,9 @@ Tree::SelectMode Tree::get_select_mode() const { void Tree::deselect_all() { TreeItem *item = get_next_selected(get_root()); while (item) { - item->deselect(selected_col); + for (int i = 0; i < columns.size(); i++) { + item->deselect(i); + } TreeItem *prev_item = item; item = get_next_selected(get_root()); ERR_FAIL_COND(item == prev_item); |