diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-01-07 01:48:58 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-01-07 01:48:58 +0300 |
commit | 4ef6bb555931d9794c05fa23b05c57372e8aae64 (patch) | |
tree | 868d568338b0dd2b5129c9d4ff7f19f19a41a7ed /source/blender/blenloader | |
parent | cd6a9198d0244f3a661f91373e0bbcb23c250c3e (diff) |
2.5 filebrowser
fixes for crashes that seem to have been introduced by changes in context handling.
TODO: initialization for windowtype pupmenu if a previous SpaceFile was there.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d5d86f72ab5..24dc69c50bf 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3956,7 +3956,7 @@ static void lib_link_screen(FileData *fd, Main *main) } else if(sl->spacetype==SPACE_FILE) { SpaceFile *sfile= (SpaceFile *)sl; - + sfile->files= NULL; sfile->params= NULL; sfile->op= NULL; /* sfile->returnfunc= NULL; @@ -4160,8 +4160,9 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) else if(sl->spacetype==SPACE_FILE) { SpaceFile *sfile= (SpaceFile *)sl; - sfile->params = NULL; - sfile->op = NULL; + sfile->files= NULL; + sfile->params= NULL; + sfile->op= NULL; /* XXX needs checking - best solve in filesel itself if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata); @@ -5212,11 +5213,17 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; break; case SPACE_FILE: + /* channel (bookmarks/directories) region */ ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); BLI_addtail(lb, ar); ar->regiontype= RGN_TYPE_CHANNELS; ar->alignment= RGN_ALIGN_LEFT; ar->v2d.scroll= V2D_SCROLL_RIGHT; + /* button UI region */ + ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); + BLI_addtail(lb, ar); + ar->regiontype= RGN_TYPE_UI; + ar->alignment= RGN_ALIGN_TOP; break; } } |