Bugfix #27927
authorTon Roosendaal <ton@blender.org>
Mon, 18 Jul 2011 14:41:59 +0000 (14:41 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 18 Jul 2011 14:41:59 +0000 (14:41 +0000)
This fixes assigning 'tweak' keymap option for border selecting in
Node editor. Thanks Perry Parks for the patch!

source/blender/windowmanager/intern/wm_operators.c

index 35afdf29b53f4b25b468c68e93db4f2704345158..29afdb570ea49733cd8778120b74c90b457f402a 100644 (file)
@@ -3567,10 +3567,12 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
 
        /* items for modal map */
        WM_modalkeymap_add_item(keymap, ESCKEY,    KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL);
-       WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_ANY, KM_ANY, 0, GESTURE_MODAL_CANCEL);
+                       /* Note: cancel only on press otherwise you cannot map this to RMB-gesture */
+       WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, 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, KM_ANY, 0, GESTURE_MODAL_SELECT);
+       WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_RELEASE, KM_ANY, 0, GESTURE_MODAL_SELECT);
 
 #if 0 // Durian guys like this
        WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_SHIFT, 0, GESTURE_MODAL_BEGIN);