summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Marzec <marzecdawid@gmail.com>2022-11-12 01:02:36 +0100
committerDawid Marzec <marzecdawid@gmail.com>2022-11-15 22:48:27 +0100
commitd4d5df2314208a99c589456a75299a334672acd2 (patch)
tree16adc131ed2f3e12eb51701342295e546d035627
parent140f0395470975f1c20648ffd8807be113a9e373 (diff)
Fix errors while deselecting all tree items; issue #65185
-rw-r--r--scene/gui/tree.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 1c96858da7..7a669a1846 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -4216,7 +4216,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);