Fix collapsing TreeItem not updating horizontal scrollbar

(cherry picked from commit d16dcbb3ac)
This commit is contained in:
Haoyu Qiu 2024-08-27 11:49:27 +08:00 committed by Rémi Verschelde
parent f783cf7b81
commit e72e42fe9b
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 10 additions and 3 deletions

View File

@ -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();
}