diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index bbd9b48c260..aa739758ecb 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -802,7 +802,8 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, void *idv, TreeElement *parent, short type, - short index) + short index, + const bool expand) { ID *id = reinterpret_cast<ID *>(idv); @@ -894,10 +895,10 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, te->idcode = GS(id->name); } - if (te->abstract_element && te->abstract_element->isExpandValid()) { + if (expand && te->abstract_element && te->abstract_element->isExpandValid()) { tree_element_expand(*te->abstract_element, *space_outliner); } - else if (type == TSE_SOME_ID) { + else if (expand && (type == TSE_SOME_ID)) { /* ID types not (fully) ported to new design yet. */ if (te->abstract_element->expandPoll(*space_outliner)) { outliner_add_id_contents(space_outliner, te, tselem, id); @@ -919,10 +920,6 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, BLI_assert_msg(false, "Element type should already use new AbstractTreeElement design"); } - if (tree_element_warnings_get(te, nullptr, nullptr)) { - te->flag |= TE_HAS_WARNING; - } - return te; } @@ -1686,6 +1683,9 @@ void outliner_build_tree(Main *mainvar, space_outliner->storeflag &= ~SO_TREESTORE_REBUILD; if (region->do_draw & RGN_DRAW_NO_REBUILD) { + BLI_assert_msg(space_outliner->runtime->tree_display != nullptr, + "Skipping rebuild before tree was built properly, a full redraw should be " + "triggered instead"); return; } |