Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-11 04:06:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-11 04:09:21 +0300
commit3141870c9657e7396a3f4b360b9ed2b8ee193122 (patch)
tree1457f4491212de28eba864621ce1a15cd3c4d607 /source/blender/editors/space_outliner/outliner_tree.c
parentf4bae1f6d6ab07e2b959e509c637f3e1505ee559 (diff)
Outliner: postpone rebuilding the tree
On existing Blender could rebuild tree many times (on freeing each ID). Use a flag instead of immediately rebuilding.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index ad37d723d1b..728a7501d5b 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1580,6 +1580,11 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
else
soops->search_flags &= ~SO_SEARCH_RECURSIVE;
+ if (soops->storeflag & SO_TREESTORE_REBUILD) {
+ soops->storeflag &= ~SO_TREESTORE_REBUILD;
+ BKE_outliner_treehash_rebuild_from_treestore(soops->treehash, soops->treestore);
+ }
+
if (soops->tree.first && (soops->storeflag & SO_TREESTORE_REDRAW))
return;