fix for previous commit, reload startup was freezing
authorMatt Ebb <matt@mke3.net>
Sat, 30 May 2009 04:24:10 +0000 (04:24 +0000)
committerMatt Ebb <matt@mke3.net>
Sat, 30 May 2009 04:24:10 +0000 (04:24 +0000)
source/blender/windowmanager/intern/wm_files.c

index 283428394af7a0d69786c4cd807460e24981c133..0e6681b134de85cf04d525232ff82b58f81525b1 100644 (file)
@@ -302,6 +302,9 @@ int WM_read_homefile(bContext *C, wmOperator *op)
        /* prevent loading no UI */
        G.fileflags &= ~G_FILE_NO_UI;
        
+       if (from_memory)
+               wm_clear_default_size(C);
+       
        /* put aside screens to match with persistant windows later */
        wm_window_match_init(C, &wmbase); 
        
@@ -309,7 +312,6 @@ int WM_read_homefile(bContext *C, wmOperator *op)
                success = BKE_read_file(C, tstr, NULL, NULL);
        } else {
                success = BKE_read_file_from_memory(C, datatoc_B_blend, datatoc_B_blend_size, NULL, NULL);
-               wm_clear_default_size(C);
        }
        
        /* match the read WM with current WM */