diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-15 13:49:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-15 14:02:44 +0300 |
commit | 3f20105622a9871e6b71e8a29b25e24a97202e38 (patch) | |
tree | 932106a3def9b36ce4d5acebd99231168294c1ee /source/blender/editors/space_outliner/outliner_tree.c | |
parent | 8021ac986a6437b6013a22d98e54186592f5d285 (diff) |
Fix random crashes in the outliner, especially with bigger scenes.
The outliner can redraw quicker without rebuilding the tree, for example when
just moving the mouse and highlighting different items. The way this worked is
that the outliner would be tagged to avoid rebuilding, however if another
operation that does require rebuilding happens in the meantime we could go out
of sync and crash.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index d1195621138..f8158c9ce7b 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1705,8 +1705,6 @@ static void outliner_restore_scrolling_position(SpaceOops *soops, ARegion *ar, O else { return; } - - soops->storeflag |= SO_TREESTORE_REDRAW; } } @@ -2070,8 +2068,9 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa BKE_outliner_treehash_rebuild_from_treestore(soops->treehash, soops->treestore); } - if (soops->tree.first && (soops->storeflag & SO_TREESTORE_REDRAW)) + if (ar->flag & RGN_DRAW_NO_REBUILD) { return; + } OutlinerTreeElementFocus focus; outliner_store_scrolling_position(soops, ar, &focus); |