diff options
author | Andrea Weikert <elubie@gmx.net> | 2011-03-23 21:51:31 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2011-03-23 21:51:31 +0300 |
commit | 26dd18e7ceba689bd784eb50e9af9a0294fdcbe1 (patch) | |
tree | 1b9628124a666e0d0506b03f9dfedba48b7a2b05 /source/blender/editors/space_file/filelist.c | |
parent | 7cef4ea008b10a879c0731b39e431594602af41d (diff) |
fix [#26591] File browser: select multiple files for Library append/link broken
* added check for valid files a bit too eagerly in Rev.35654. Solved now by
setting correct type for .blend file contents. Objects are now tagged as
regular files, while the list (Mesh, Material, ...) (no idcode given) is
tagged as directory.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index da8226de516..a32cfe29970 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1057,8 +1057,11 @@ void filelist_from_library(struct FileList* filelist) char *blockname= l->link; filelist->filelist[i + 1].relname= BLI_strdup(blockname); - if (!idcode) + if (idcode) { + filelist->filelist[i + 1].type |= S_IFREG; + } else { filelist->filelist[i + 1].type |= S_IFDIR; + } } if(previews) { @@ -1194,7 +1197,7 @@ void filelist_from_main(struct FileList *filelist) files->relname= MEM_mallocN(FILE_MAXDIR+FILE_MAXFILE+32, "filename for lib"); sprintf(files->relname, "%s | %s", id->lib->name, id->name+2); } - /* files->type |= S_IFDIR; */ + files->type |= S_IFREG; #if 0 // XXXXX TODO show the selection status of the objects if(!filelist->has_func) { /* F4 DATA BROWSE */ if(idcode==ID_OB) { |