diff options
author | Ton Roosendaal <ton@blender.org> | 2005-07-28 15:05:21 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-07-28 15:05:21 +0400 |
commit | d501f56e96a5258dca09b1f75f475ef290445c22 (patch) | |
tree | 5a6334eb6faef19d6b40f7e4dd65832597ed0dc6 /source | |
parent | 4cc96528b8bb8df6e81efe4654048f4730f2b34e (diff) |
Bugfix #2875
Removed old code that was used when the global undo still saved files. It
was restoring pointers in the UI based on names, which gave confusing
results when loading the quit.blend file (actually undobuffer).
Instead it should treat the quit.blend same as "Load without UI" option.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 16 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 2 |
3 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index a235475c8aa..f439a124460 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -320,7 +320,7 @@ static void setup_app_data(BlendFileData *bfd, char *filename) /* no load screens? */ if(mode) { /* comes from readfile.c */ - extern void lib_link_screen_restore(Main *, char, Scene *); + extern void lib_link_screen_restore(Main *, Scene *); SWAP(ListBase, G.main->screen, bfd->main->screen); @@ -333,7 +333,7 @@ static void setup_app_data(BlendFileData *bfd, char *filename) curscreen->scene= curscene; /* clear_global will free G.main, here we can still restore pointers */ - lib_link_screen_restore(bfd->main, mode, curscene); + lib_link_screen_restore(bfd->main, curscene); } clear_global(); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6bf63c2b2b7..738a928379b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -239,7 +239,6 @@ typedef struct OldNewMap { /* local prototypes */ -void lib_link_screen_restore(Main *, char , Scene *); extern short freeN(void *vmemh); /* defined in util.h */ @@ -2824,16 +2823,16 @@ static void *restore_pointer_by_name(Main *mainp, ID *id, int user) } /* called from kernel/blender.c */ -void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene) +/* used to link a file (without UI) to the current UI */ +void lib_link_screen_restore(Main *newmain, Scene *curscene) { bScreen *sc; ScrArea *sa; sc= newmain->screen.first; while(sc) { - - if(mode=='u') sc->scene= restore_pointer_by_name(newmain, (ID *)sc->scene, 1); - if(sc->scene==NULL || mode=='n') sc->scene= curscene; + + sc->scene= curscene; sa= sc->areabase.first; while(sa) { @@ -2843,8 +2842,7 @@ void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene) if(sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; - if(mode=='u') v3d->camera= restore_pointer_by_name(newmain, (ID *)v3d->camera, 1); - if(v3d->camera==NULL || mode=='n') v3d->camera= sc->scene->camera; + v3d->camera= sc->scene->camera; if(v3d->bgpic) { v3d->bgpic->ima= restore_pointer_by_name(newmain, (ID *)v3d->bgpic->ima, 1); @@ -2854,8 +2852,8 @@ void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene) } if(v3d->localvd) { Base *base; - if(mode=='u') v3d->localvd->camera= restore_pointer_by_name(newmain, (ID *)v3d->localvd->camera, 1); - if(v3d->localvd->camera==NULL || mode=='n') v3d->localvd->camera= sc->scene->camera; + + v3d->localvd->camera= sc->scene->camera; /* localview can become invalid during undo/redo steps, so we exit it when no could be found */ for(base= sc->scene->base.first; base; base= base->next) { diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index bfedf5218a9..e17a59821f9 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1679,7 +1679,7 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm) uiBlockEndAlign(block); - by-=42; + by-=60; if(by < -200) break; // for time being... extreme long panels are very slow } } |