Merge pull request #96142 from timothyqiu/one-signal-to-invalidate-them-all

Fix collapsing `TreeItem` not updating horizontal scrollbar
This commit is contained in:
Rémi Verschelde 2024-09-02 18:08:07 +02:00
commit 68a04bbf9a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 10 additions and 3 deletions

View File

@ -4490,9 +4490,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()) {
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();
}