Revision: 32473
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32473
Author:   campbellbarton
Date:     2010-10-14 15:18:42 +0200 (Thu, 14 Oct 2010)

Log Message:
-----------
bugfix [#23070] some shortcuts cannot be saved in a usual way

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2010-10-14 13:17:34 UTC (rev 32472)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2010-10-14 13:18:42 UTC (rev 32473)
@@ -3955,7 +3955,8 @@
                
                /* complex code to change name of button */
                if(WM_key_event_operator_string(C, but->optype->idname, 
but->opcontext, prop, buf, sizeof(buf))) {
-                       
+                       wmKeyMap *km= NULL;
+
                        butstr= MEM_mallocN(strlen(but->str)+strlen(buf)+2, 
"menu_block_set_keymaps");
                        
                        // XXX but->str changed... should not, remove the 
hotkey from it
@@ -3971,6 +3972,11 @@
                        MEM_freeN(butstr);
                        
                        ui_check_but(but);
+                       
+                       /* set the keymap editable else the key wont save */
+                       WM_key_event_operator_id(C, but->optype->idname, 
but->opcontext, prop, 1, &km);
+                       WM_keymap_copy_to_user(km);
+                               
                } else {
                        /* shortcut was removed */
                        cpoin= strchr(but->str, '|');


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to