diff options
author | Julian Eisel <julian@blender.org> | 2022-08-19 22:56:09 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-19 23:21:10 +0300 |
commit | 231078441f011c13cac8bc06bed02260ca828ce7 (patch) | |
tree | 67c2db300e171f07dec15ba0fa80a1a1c994daee /source/blender/editors/space_outliner/outliner_utils.cc | |
parent | 8115d31248cab167e3142c975154d8f92d3beafd (diff) |
Outliner: Refactor how lazy-building of children is done
Makes the lazy-building (where children are only built when the parent
isn't collapsed) more generic, so more display modes can use it. So far
this was hardcoded for the "Data API" display mode.
This will be used to work around a big performance issue with the
Library Overrides Hierachies view in a complex production file, see
following commit.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_utils.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index 2ab9e146bc1..a077fd66f8c 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -27,6 +27,7 @@ #include "UI_view2d.h" #include "outliner_intern.hh" +#include "tree/tree_display.hh" #include "tree/tree_iterator.hh" using namespace blender::ed::outliner; @@ -436,7 +437,7 @@ void outliner_tag_redraw_avoid_rebuild_on_open_change(const SpaceOutliner *space ARegion *region) { /* Avoid rebuild if possible. */ - if (outliner_requires_rebuild_on_open_change(space_outliner)) { + if (space_outliner->runtime->tree_display->is_lazy_built()) { ED_region_tag_redraw(region); } else { |