From 586d660b215083e504e2c5734197aeee639dfac8 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 6 Feb 2009 11:11:42 +0000 Subject: 2.5 Bugfix: on reading multiple pre-2.5 files, the keymaps were generated again, causing items to be added double. --- source/blender/windowmanager/intern/wm_files.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/windowmanager') 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? */ -- cgit v1.2.3