Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-23 20:50:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-23 20:50:25 +0400
commitbf5f5bd3bd1bcd0678518e84ef778af30e940264 (patch)
treec3e3d07c5c6fdadb49bc1482b364a63259a20b20 /source/blender
parent4c4ec56f49e41e75da1bf8d83ff36ff70f862f43 (diff)
Fix #20863: when loading a file without UI, with multiple windows open,
the other windows would not preserve the screens correctly, code for reading 2.4x files was running when it didn't need to.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 6457e184066..04f5175b1bf 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -179,21 +179,23 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
/* we've read file without wm..., keep current one entirely alive */
if(G.main->wm.first==NULL) {
- bScreen *screen= CTX_wm_screen(C);
-
- /* match oldwm to new dbase, only old files */
-
- for(wm= oldwmlist->first; wm; wm= wm->id.next) {
-
- for(win= wm->windows.first; win; win= win->next) {
- /* all windows get active screen from file */
- if(screen->winid==0)
- win->screen= screen;
- else
- win->screen= ED_screen_duplicate(win, screen);
+ /* when loading without UI, no matching needed */
+ if(!(G.fileflags & G_FILE_NO_UI)) {
+ bScreen *screen= CTX_wm_screen(C);
+
+ /* match oldwm to new dbase, only old files */
+ for(wm= oldwmlist->first; wm; wm= wm->id.next) {
- BLI_strncpy(win->screenname, win->screen->id.name+2, 21);
- win->screen->winid= win->winid;
+ for(win= wm->windows.first; win; win= win->next) {
+ /* all windows get active screen from file */
+ if(screen->winid==0)
+ win->screen= screen;
+ else
+ win->screen= ED_screen_duplicate(win, screen);
+
+ BLI_strncpy(win->screenname, win->screen->id.name+2, 21);
+ win->screen->winid= win->winid;
+ }
}
}