Revision: 39135
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39135
Author:   nazgul
Date:     2011-08-07 12:08:58 +0000 (Sun, 07 Aug 2011)
Log Message:
-----------
Merging r39121 through r39134 from trunk into soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39121
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39134

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c

Property Changed:
----------------
    branches/soc-2011-tomato/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36831-39120
   + /trunk/blender:36831-39134

Modified: 
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c
===================================================================
--- branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c    
2011-08-07 12:07:41 UTC (rev 39134)
+++ branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c    
2011-08-07 12:08:58 UTC (rev 39135)
@@ -532,7 +532,7 @@
        }
 }
 
-static void wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, 
wmKeyMap *addonmap, wmKeyMap *usermap)
+static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, 
wmKeyMap *addonmap, wmKeyMap *usermap)
 {
        wmKeyMap *km;
        int expanded = 0;
@@ -552,8 +552,6 @@
                wmKeyMapItem *kmi, *orig_kmi;
 
                km = wm_keymap_copy(usermap);
-               km->modal_items = defaultmap->modal_items;
-               km->poll = defaultmap->poll;
 
                /* try to find corresponding id's for items */
                for(kmi=km->items.first; kmi; kmi=kmi->next) {
@@ -587,6 +585,8 @@
 
        /* add to list */
        BLI_addtail(lb, km);
+       
+       return km;
 }
 
 static void wm_keymap_diff_update(ListBase *lb, wmKeyMap *defaultmap, wmKeyMap 
*addonmap, wmKeyMap *km)
@@ -977,7 +977,7 @@
 
 void WM_keyconfig_update(wmWindowManager *wm)
 {
-       wmKeyMap *km, *defaultmap, *addonmap, *usermap;
+       wmKeyMap *km, *defaultmap, *addonmap, *usermap, *kmn;
        wmKeyMapItem *kmi;
        wmKeyMapDiffItem *kmdi;
        int compat_update = 0;
@@ -1021,8 +1021,13 @@
                usermap= WM_keymap_list_find(&U.user_keymaps, km->idname, 
km->spaceid, km->regionid);
 
                /* add */
-               wm_keymap_patch_update(&wm->userconf->keymaps, defaultmap, 
addonmap, usermap);
+               kmn= wm_keymap_patch_update(&wm->userconf->keymaps, defaultmap, 
addonmap, usermap);
 
+               if(kmn) {
+                       kmn->modal_items= km->modal_items;
+                       kmn->poll= km->poll;
+               }
+
                /* in case of old non-diff keymaps, force extra update to 
create diffs */
                compat_update = compat_update || (usermap && !(usermap->flag & 
KEYMAP_DIFF));
        }

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

Reply via email to