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_ops.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_ops.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_ops.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 2c4670d9ea3..9f466d331f3 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -271,11 +271,13 @@ static int outliner_item_drag_drop_modal(bContext *C, wmOperator *op, const wmEv break; } - if (skip_rebuild) { - soops->storeflag |= SO_TREESTORE_REDRAW; /* only needs to redraw, no rebuild */ - } if (redraw) { - ED_region_tag_redraw(ar); + if (skip_rebuild) { + ED_region_tag_redraw_no_rebuild(ar); + } + else { + ED_region_tag_redraw(ar); + } } return retval; @@ -389,8 +391,7 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator *op, const wmE /* unset highlighted tree element, dragged one will be highlighted instead */ outliner_set_flag(&soops->tree, TSE_HIGHLIGHTED, false); - soops->storeflag |= SO_TREESTORE_REDRAW; /* only needs to redraw, no rebuild */ - ED_region_tag_redraw(ar); + ED_region_tag_redraw_no_rebuild(ar); WM_event_add_modal_handler(C, op); |