Fix errors while deselecting all tree items; issue #65185

(cherry picked from commit d4d5df2314)
This commit is contained in:
Dawid Marzec 2022-11-12 01:02:36 +01:00 committed by Rémi Verschelde
parent b5bf60e04f
commit ecef4804f2
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 1 deletions

View File

@ -3089,7 +3089,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);