diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-01 15:00:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-01 15:00:11 +0300 |
commit | 3982d3c171522ca730685dd7a14c7dca663d8fe3 (patch) | |
tree | 657a3c870c4455f50f0e128ff14881e14ce74b7d /source/blender/windowmanager/intern | |
parent | 9f77c202868b1b44fa35c1b689a56b1ef2ac4ac0 (diff) |
WM: add gesture variable to detect first execution
Needed for circle select to replace the current selection.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture_ops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index db63eccfd41..030cf15adfb 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -251,6 +251,7 @@ int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event) } #endif + gesture->is_active_prev = gesture->is_active; return OPERATOR_RUNNING_MODAL; } @@ -383,8 +384,8 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) } else { /* apply first click */ - gesture_circle_apply(C, op); gesture->is_active = true; + gesture_circle_apply(C, op); wm_gesture_tag_redraw(C); } break; @@ -422,7 +423,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) } #endif - + gesture->is_active_prev = gesture->is_active; return OPERATOR_RUNNING_MODAL; } @@ -655,6 +656,8 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event) gesture_modal_end(C, op); return OPERATOR_CANCELLED; } + + gesture->is_active_prev = gesture->is_active; return OPERATOR_RUNNING_MODAL; } @@ -841,6 +844,7 @@ int WM_gesture_straightline_modal(bContext *C, wmOperator *op, const wmEvent *ev } } + gesture->is_active_prev = gesture->is_active; return OPERATOR_RUNNING_MODAL; } |