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:
authorTon Roosendaal <ton@blender.org>2008-12-31 21:52:15 +0300
committerTon Roosendaal <ton@blender.org>2008-12-31 21:52:15 +0300
commit471fc0947987660ff500964f453a244593b62e52 (patch)
tree1314a0321359ec6733e1b7c960210fdf6c356a32 /source/blender/blenloader
parent0f93d129f43ce39f045b53a09c006c4993d7ccd7 (diff)
2.5
My last one for 2008: global undo/redo back :) Happy 2009 all!
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 04903adc03a..f79625094c8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4046,11 +4046,26 @@ static void *restore_pointer_by_name(Main *mainp, ID *id, int user)
/* called from kernel/blender.c */
/* used to link a file (without UI) to the current UI */
/* note that it assumes the old pointers in UI are still valid, so old Main is not freed */
-void lib_link_screen_restore(Main *newmain, Scene *curscene)
+void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
{
+ wmWindow *win;
+ wmWindowManager *wm;
bScreen *sc;
ScrArea *sa;
+ /* first windowmanager */
+ for(wm= newmain->wm.first; wm; wm= wm->id.next) {
+ for(win= wm->windows.first; win; win= win->next) {
+ win->screen= restore_pointer_by_name(newmain, (ID *)win->screen, 1);
+
+ if(win->screen==NULL)
+ win->screen= curscreen;
+
+ win->screen->winid= win->winid;
+ }
+ }
+
+
for(sc= newmain->screen.first; sc; sc= sc->id.next) {
sc->scene= restore_pointer_by_name(newmain, (ID *)sc->scene, 1);