From 212d73684267da54943fa368b27889d117c86cb8 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 5 Feb 2024 16:49:42 +0100 Subject: [PATCH] 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. --- source/blender/editors/interface/views/tree_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/interface/views/tree_view.cc b/source/blender/editors/interface/views/tree_view.cc index 0320f5688d1..703fdee3cab 100644 --- a/source/blender/editors/interface/views/tree_view.cc +++ b/source/blender/editors/interface/views/tree_view.cc @@ -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; }