Fix assert when setting default collapsed state of items

Would assert that the reconstruction phase is not completed. In this
case collapsing is modified as part of the construction, so the assert
is wrong. Access the collapsed state directly without using the getter
that does the assert check.
This commit is contained in:
Julian Eisel
2024-02-05 16:49:42 +01:00
parent ec5594ec7f
commit 212d736842

View File

@@ -516,7 +516,7 @@ bool AbstractTreeViewItem::set_collapsed(const bool collapsed)
if (!is_collapsible()) {
return false;
}
if (collapsed == is_collapsed()) {
if (collapsed == !is_open_) {
return false;
}