diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-09 23:00:49 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-16 21:30:54 +0300 |
commit | 7ee23928878bafb32b53767806f613cc72d10c38 (patch) | |
tree | 7b52f10757e49cfc3441b3d77b21fd98233dd009 /source/blender/editors/space_outliner/outliner_dragdrop.c | |
parent | 7ba2de8f8f5a0b404474eaaf822590781f73a745 (diff) |
Outliner: Support box select on click+drag
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_dragdrop.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index cfbf9c05648..6031ba5cffc 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -895,6 +895,12 @@ static int outliner_item_drag_drop_invoke(bContext *C, return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); } + float view_mval[2]; + UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &view_mval[0], &view_mval[1]); + if (outliner_item_is_co_within_close_toggle(te, view_mval[0])) { + return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH); + } + wmDrag *drag = WM_event_start_drag(C, data.icon, WM_DRAG_ID, NULL, 0.0, WM_DRAG_NOP); if (ELEM(GS(data.drag_id->name), ID_OB, ID_GR)) { |