diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-17 04:42:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-17 04:42:51 +0300 |
commit | dd91d7d09d9994bc20bdbfb501d5101044ac99c8 (patch) | |
tree | 40a4667b6b99e0cf3b29121ac2e0c65817512b00 /source/blender/windowmanager | |
parent | 8ffb76138731d6241a6ac5bfc17bb764cfa59053 (diff) | |
parent | 57ec19e0e5cbb96392eccf12d4ccc17c4cf9b65b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 012b1e21d9f..77dbecec9f0 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2995,6 +2995,11 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, const wmEvent *e op->customdata = WM_gesture_new(C, event, WM_GESTURE_STRAIGHTLINE); + if (ISTWEAK(event->type)) { + wmGesture *gesture = op->customdata; + gesture->is_active = true; + } + /* add modal handler */ WM_event_add_modal_handler(C, op); @@ -4488,7 +4493,7 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_ANY, KM_ANY, 0, GESTURE_MODAL_CANCEL); WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, GESTURE_MODAL_BEGIN); - WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, 0, 0, GESTURE_MODAL_SELECT); + WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, GESTURE_MODAL_SELECT); /* assign map to operators */ WM_modalkeymap_assign(keymap, "IMAGE_OT_sample_line"); |