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>2019-03-07 15:41:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-07 15:45:58 +0300
commit190159589840547c9b58b8d639a76313cee9478b (patch)
tree931089016e76532c63129387aec87e80cd83500f /source/blender/editors/space_action/action_select.c
parenta280867ac2ed924e25f72d020c004b83044a1f51 (diff)
Tool System: use set/add/subtract for all lasso select operators
Diffstat (limited to 'source/blender/editors/space_action/action_select.c')
-rw-r--r--source/blender/editors/space_action/action_select.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index ed63cb523de..872f889e8b4 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -542,9 +542,6 @@ static int actkeys_lassoselect_exec(bContext *C, wmOperator *op)
rcti rect;
rctf rect_fl;
- short selectmode;
- bool extend;
-
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
@@ -554,15 +551,11 @@ static int actkeys_lassoselect_exec(bContext *C, wmOperator *op)
if (data_lasso.mcords == NULL)
return OPERATOR_CANCELLED;
- /* clear all selection if not extending selection */
- extend = RNA_boolean_get(op->ptr, "extend");
- if (!extend)
+ const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode");
+ const int selectmode = (sel_op != SEL_OP_SUB) ? SELECT_ADD : SELECT_SUBTRACT;
+ if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
deselect_action_keys(&ac, 1, SELECT_SUBTRACT);
-
- if (!RNA_boolean_get(op->ptr, "deselect"))
- selectmode = SELECT_ADD;
- else
- selectmode = SELECT_SUBTRACT;
+ }
/* get settings from operator */
BLI_lasso_boundbox(&rect, data_lasso.mcords, data_lasso.mcords_tot);
@@ -597,7 +590,8 @@ void ACTION_OT_select_lasso(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* properties */
- WM_operator_properties_gesture_lasso_select(ot);
+ WM_operator_properties_gesture_lasso(ot);
+ WM_operator_properties_select_operation_simple(ot);
}
/* ------------------- */