Skip to content

Commit

Permalink
Fix collapsing TreeItem not updating horizontal scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyqiu committed Aug 27, 2024
1 parent db76de5 commit d16dcbb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scene/gui/tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4495,9 +4495,16 @@ void Tree::item_edited(int p_column, TreeItem *p_item, MouseButton p_custom_mous
}

void Tree::item_changed(int p_column, TreeItem *p_item) {
if (p_item != nullptr && p_column >= 0 && p_column < p_item->cells.size()) {
p_item->cells.write[p_column].dirty = true;
columns.write[p_column].cached_minimum_width_dirty = true;
if (p_item != nullptr) {
if (p_column >= 0 && p_column < p_item->cells.size()) {
p_item->cells.write[p_column].dirty = true;
columns.write[p_column].cached_minimum_width_dirty = true;
} else if (p_column == -1) {
for (int i = 0; i < p_item->cells.size(); i++) {
p_item->cells.write[i].dirty = true;
columns.write[i].cached_minimum_width_dirty = true;
}
}
}
queue_redraw();
}
Expand Down

0 comments on commit d16dcbb

Please sign in to comment.