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-05 14:26:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-05 14:26:45 +0300
commit8d8d113b7379b96d8cd9440f4e1f87524a418fef (patch)
treeecc4ac8f59c846918fd280db82ee87dc15c92e4d /source/blender/editors/gpencil/gpencil_select.c
parent0ae6747300a74daf14482f9ca89caffa9e503454 (diff)
Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_select.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index e3d4b42e359..1e7a34eeecd 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -906,8 +906,6 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
const int my = RNA_int_get(op->ptr, "y");
const int radius = RNA_int_get(op->ptr, "radius");
- bool select = !RNA_boolean_get(op->ptr, "deselect");
-
GP_SpaceConversion gsc = {NULL};
/* for bounding rect around circle (for quicky intersection testing) */
rcti rect = {0};
@@ -921,6 +919,14 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ const eSelectOp sel_op = ED_select_op_modal(
+ RNA_enum_get(op->ptr, "mode"), WM_gesture_is_modal_first(op->customdata));
+ const bool select = (sel_op != SEL_OP_SUB);
+ if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
+ ED_gpencil_select_toggle_all(C, SEL_DESELECT);
+ changed = true;
+ }
+
/* init space conversion stuff */
gp_point_conversion_init(C, &gsc);
@@ -973,7 +979,8 @@ void GPENCIL_OT_select_circle(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA;
/* properties */
- WM_operator_properties_gesture_circle_select(ot);
+ WM_operator_properties_gesture_circle(ot);
+ WM_operator_properties_select_operation_simple(ot);
}
/** \} */