Revision: 24957
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24957
Author:   aligorith
Date:     2009-11-28 03:53:11 +0100 (Sat, 28 Nov 2009)

Log Message:
-----------
Bugfix #20125: View 2D Zoom to Border was missing modal keymap

TODO: a better keymap for specifying zoom in or out mapped to LMB and RMB 
respectively for zoom to border is required. The current behaviour only allows 
zoom in...

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c    
2009-11-28 01:26:14 UTC (rev 24956)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c    
2009-11-28 02:53:11 UTC (rev 24957)
@@ -2662,12 +2662,12 @@
        {GESTURE_MODAL_BORDER_BEGIN,    "BEGIN", 0, "Begin", ""},
        {0, NULL, 0, NULL, NULL}};
 
-       wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Gesture Border");
+       wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Border");
 
        /* this function is called for each spacetype, only needs to add map 
once */
        if(keymap) return;
 
-       keymap= WM_modalkeymap_add(keyconf, "View3D Gesture Border", 
modal_items);
+       keymap= WM_modalkeymap_add(keyconf, "Gesture Border", modal_items);
 
        /* items for modal map */
        WM_modalkeymap_add_item(keymap, ESCKEY,    KM_PRESS, KM_ANY, 0, 
GESTURE_MODAL_CANCEL);
@@ -2697,10 +2697,11 @@
 //     WM_modalkeymap_assign(keymap, "SCREEN_OT_border_select"); // template
        WM_modalkeymap_assign(keymap, "SEQUENCER_OT_select_border");
        WM_modalkeymap_assign(keymap, "UV_OT_select_border");
+       WM_modalkeymap_assign(keymap, "VIEW2D_OT_zoom_border");
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_clip_border");
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_render_border");
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_border");
-       WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border");
+       WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); // XXX TODO: 
zoom border should perhaps map rightmouse to zoom out instead of in+cancel
 }
 
 /* default keymap for windows and screens, only call once per WM */


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to