diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-05 14:26:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-05 14:26:45 +0300 |
commit | 8d8d113b7379b96d8cd9440f4e1f87524a418fef (patch) | |
tree | ecc4ac8f59c846918fd280db82ee87dc15c92e4d /source/blender/windowmanager/intern | |
parent | 0ae6747300a74daf14482f9ca89caffa9e503454 (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/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 7 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operator_props.c | 17 |
2 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 09fc143f71d..c9853776902 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -116,6 +116,13 @@ void WM_gestures_remove(bContext *C) WM_gesture_end(C, win->gesture.first); } +bool WM_gesture_is_modal_first(const wmGesture *gesture) +{ + if (gesture == NULL) { + return true; + } + return (gesture->is_active_prev == false); +} /* tweak and line gestures */ int wm_gesture_evaluate(wmGesture *gesture) diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 330c66c3a6a..5700e4fc0bc 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -353,7 +353,7 @@ void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) /** * Use with #WM_gesture_circle_invoke */ -void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool deselect) +void WM_operator_properties_gesture_circle(wmOperatorType *ot) { PropertyRNA *prop; const int radius_default = 25; @@ -366,21 +366,6 @@ void WM_operator_properties_gesture_circle_ex(wmOperatorType *ot, bool deselect) prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - - if (deselect) { - prop = RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Deselect rather than select items"); - RNA_def_property_flag(prop, PROP_SKIP_SAVE); - } -} - -void WM_operator_properties_gesture_circle(wmOperatorType *ot) -{ - WM_operator_properties_gesture_circle_ex(ot, false); -} - -void WM_operator_properties_gesture_circle_select(wmOperatorType *ot) -{ - WM_operator_properties_gesture_circle_ex(ot, true); } void WM_operator_properties_mouse_select(wmOperatorType *ot) |