diff options
author | Andrea Weikert <elubie@gmx.net> | 2008-05-06 23:29:37 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2008-05-06 23:29:37 +0400 |
commit | 917865b5049acaa2e13b7d40ebf879121c7e2148 (patch) | |
tree | 0c1118f66812ffba077317c6d4f34463b1fceaf2 /source/blender/src/imasel.c | |
parent | c0d981f6db057fbe8c5a9483382bab1e20572e38 (diff) |
== bugfix ==
[#10312] Append Link (image browser) bug if combined with Open window
The only place where the special handling in newspace is relevenant is when
opening it with the windowtype_pupmenu. All other overlaying windows( render in image space, scriptspace)
should leave imagebrowser/filebrowser space alone.
Diffstat (limited to 'source/blender/src/imasel.c')
-rw-r--r-- | source/blender/src/imasel.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/src/imasel.c b/source/blender/src/imasel.c index be9f489ea49..f502445d329 100644 --- a/source/blender/src/imasel.c +++ b/source/blender/src/imasel.c @@ -80,3 +80,26 @@ void free_imasel(SpaceImaSel *simasel) } } +/* resets a previous imagebrowser space type */ +/* is used when opening an imagebrowser directly from windowtype_pupmenu, + since in that case we don't want any load/save/append/link action +*/ +void reset_imaselspace(ScrArea *sa) +{ + if(sa->spacetype==SPACE_IMASEL) { + SpaceImaSel *simasel= sa->spacedata.first; + if(simasel->type==FILE_MAIN) { + if (simasel->files) { + BIF_filelist_free(simasel->files); + BIF_filelist_settype(simasel->files, FILE_MAIN); + } + } else { + if (simasel->files) { + simasel->type= FILE_UNIX; + BIF_filelist_settype(simasel->files, simasel->type); + } + } + simasel->returnfunc= NULL; + simasel->title[0]= 0; + } +} |