[Bf-blender-cvs] [57ec19e0e5c] master: WM: immediate line-gesture activation on tweak
Campbell Barton
noreply at git.blender.org
Tue Oct 17 03:37:18 CEST 2017
Commit: 57ec19e0e5cbb96392eccf12d4ccc17c4cf9b65b
Author: Campbell Barton
Date: Tue Oct 17 12:37:26 2017 +1100
Branches: master
https://developer.blender.org/rB57ec19e0e5cbb96392eccf12d4ccc17c4cf9b65b
WM: immediate line-gesture activation on tweak
Matches border-gesture behavior,
needed for binding bisect to tweak event.
===================================================================
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 9a1c01487b5..d783b5fd925 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2942,6 +2942,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);
@@ -4416,7 +4421,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");
More information about the Bf-blender-cvs
mailing list