Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2010-04-29 22:53:01 +0400
committerAndrea Weikert <elubie@gmx.net>2010-04-29 22:53:01 +0400
commitcbc2a71128156d2caac653df5cb021e819fd159a (patch)
tree333018ee07e5201c9b087e13503f199837d2ed59 /source/blender/editors
parentdf2ed9fa3bb5e2dbea0428a27a5ba901027e52ec (diff)
[#22133] File Browser Mismatches File Name and Thumbnail
* sorting of file list interfered with thumbnail order, stopping job while sorting now.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_file/filelist.c6
-rw-r--r--source/blender/editors/space_file/space_file.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 455a5ab951e..f38b06e7b85 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -613,9 +613,7 @@ struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
if (!imb)
{
if ( (filelist->filelist[fidx].flags & IMAGEFILE) || (filelist->filelist[fidx].flags & MOVIEFILE) ) {
- char path[FILE_MAX];
- BLI_join_dirfile(path, filelist->dir, filelist->filelist[fidx].relname);
- imb = IMB_thumb_read(path, THB_NORMAL);
+ imb = IMB_thumb_read(filelist->filelist[fidx].path, THB_NORMAL);
}
if (imb) {
filelist->filelist[fidx].image = imb;
@@ -1336,7 +1334,7 @@ void thumbnails_start(struct FileList* filelist, const struct bContext* C)
if (!filelist->filelist[idx].image) {
if ( (filelist->filelist[idx].flags & IMAGEFILE) || (filelist->filelist[idx].flags & MOVIEFILE) ) {
FileImage* limg = MEM_callocN(sizeof(struct FileImage), "loadimage");
- BLI_join_dirfile(limg->path, filelist->dir, filelist->filelist[idx].relname);
+ BLI_strncpy(limg->path, filelist->filelist[idx].path, FILE_MAX);
limg->index= idx;
limg->flags= filelist->filelist[idx].flags;
BLI_addtail(&tj->loadimages, limg);
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 4edc3268fcb..efdd8cb0db1 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -195,13 +195,24 @@ static void file_refresh(const bContext *C, ScrArea *sa)
filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0);
if (filelist_empty(sfile->files))
{
+ thumbnails_stop(sfile->files, C);
filelist_readdir(sfile->files);
- thumbnails_start(sfile->files, C);
+ if(params->sort!=FILE_SORT_NONE) {
+ filelist_sort(sfile->files, params->sort);
+ }
BLI_strncpy(params->dir, filelist_dir(sfile->files), FILE_MAX);
+ thumbnails_start(sfile->files, C);
} else {
filelist_filter(sfile->files);
+ if(params->sort!=FILE_SORT_NONE) {
+ thumbnails_stop(sfile->files, C);
+ filelist_sort(sfile->files, params->sort);
+ thumbnails_start(sfile->files, C);
+ } else {
+ filelist_filter(sfile->files);
+ }
+
}
- if(params->sort!=FILE_SORT_NONE) filelist_sort(sfile->files, params->sort);
if (params->renamefile[0] != '\0') {
int idx = filelist_find(sfile->files, params->renamefile);