diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-07 12:33:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-07 12:34:10 +0300 |
commit | 219e2f976d077c16c28d72a2f6763c01230c5bf8 (patch) | |
tree | ba40e7f79947dd11cae4a08ed813f920c00fbfd7 /source/blender/editors/space_outliner | |
parent | e52e0c83d717b46afcce36b23e3f6b32f5cb535b (diff) |
Tool System: use set/add/subtract for all box select operators
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 1f59658b8ab..09fa6d63557 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1262,14 +1262,18 @@ static int outliner_box_select_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); SpaceOutliner *soops = CTX_wm_space_outliner(C); ARegion *ar = CTX_wm_region(C); - TreeElement *te; rctf rectf; - bool select = !RNA_boolean_get(op->ptr, "deselect"); + + const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode"); + const bool select = (sel_op != SEL_OP_SUB); + if (SEL_OP_USE_PRE_DESELECT(sel_op)) { + outliner_flag_set(&soops->tree, TSE_SELECTED, 0); + } WM_operator_properties_border_to_rctf(op, &rectf); UI_view2d_region_to_view_rctf(&ar->v2d, &rectf, &rectf); - for (te = soops->tree.first; te; te = te->next) { + for (TreeElement *te = soops->tree.first; te; te = te->next) { outliner_item_box_select(soops, scene, &rectf, te, select); } @@ -1298,8 +1302,9 @@ void OUTLINER_OT_select_box(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* rna */ - WM_operator_properties_gesture_box_ex(ot, true, false); + /* properties */ + WM_operator_properties_gesture_box(ot); + WM_operator_properties_select_operation_simple(ot); } /* ****************************************************** */ |