diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-06 14:11:42 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-06 14:11:42 +0300 |
commit | 586d660b215083e504e2c5734197aeee639dfac8 (patch) | |
tree | 68ac9cf47f78a504b11d7a9ddf04692b15d40c95 | |
parent | 0355dcc618d8e4ee6c9e40b09d58eacefb01ee30 (diff) |
2.5
Bugfix: on reading multiple pre-2.5 files, the keymaps were generated
again, causing items to be added double.
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index a87e22060fd..bd550fc6d44 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -428,8 +428,8 @@ return; 2- no current wm, but read wm: that's OK, do nothing 3- current wm, but not in file: try match screen names 4- current wm, and wm in file: try match ghostwin - */ + static void wm_window_match_do(bContext *C, ListBase *oldwmlist) { wmWindowManager *oldwm, *wm; @@ -444,13 +444,11 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) else { /* cases 3 and 4 */ - /* we've read file without wm... */ + /* we've read file without wm..., keep current one entirely alive */ if(G.main->wm.first==NULL) { /* match oldwm to new dbase, only old files */ for(wm= oldwmlist->first; wm; wm= wm->id.next) { - /* ensure making new keymaps and set space types */ - wm->initialized= 0; for(win= wm->windows.first; win; win= win->next) { /* all windows get active screen from file */ @@ -464,6 +462,9 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) /* XXX still solve, case where multiple windows open */ G.main->wm= *oldwmlist; + + /* screens were read from file! */ + ED_screens_initialize(G.main->wm.first); } else { /* what if old was 3, and loaded 1? */ |