diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-15 17:18:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-15 17:18:56 +0400 |
commit | 20ff5bdc34e7289274416829d893d74b527228da (patch) | |
tree | acc303fdc193594fee00396a28ebd671baf0a7df /source/blender/src/filesel.c | |
parent | 2f1cca95286ccd7f14ff53618e4263170078ba27 (diff) |
changing between libraries with the append/link library selector didnt re-read a new blend file when it alredy had one loaded.
it looks like this only ever worked for the first library selected.
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r-- | source/blender/src/filesel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index bfff2f10ab6..9689ffdafeb 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1588,8 +1588,7 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_strncpy(sfile->dir, butname, sizeof(sfile->dir)); /* strip the trailing slash if its a real dir */ - if (strlen(butname)!=1) - butname[strlen(butname)-1]=0; + BLI_del_slash(butname); if(sfile->type & FILE_UNIX) { if (!BLI_exists(butname)) { @@ -1633,6 +1632,11 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_strncpy(sfile->dir, lib->filename, sizeof(sfile->dir)); BLI_make_exist(sfile->dir); BLI_cleanup_dir(G.sce, sfile->dir); + + /* forced re-reading the blend file */ + if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata); + sfile->libfiledata= 0; + freefilelist(sfile); sfile->ofs= 0; scrarea_queue_winredraw(curarea); |