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-05-14 14:50:43 +0400
committerAndrea Weikert <elubie@gmx.net>2010-05-14 14:50:43 +0400
commit5b4f264bad786684841e9c23256181cc39c1ccca (patch)
tree75e45eff38cfbc396167ea5308b1a45f41b82aa9 /source/blender/editors/space_file/space_file.c
parent8b4b68becb710e687d8093685d1463a39ca350fe (diff)
== filebrowser ==
* small update for thumbnails, now the thumbnail thread only runs when the filebrowser is in thumbnail view. (Thread was still running previously, even if it did nothing) * this allows workaround for slower network drives, so the user can prevent thumbnail generation when not displaying them.
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r--source/blender/editors/space_file/space_file.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 95a1771ebbb..300a72851a4 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -201,17 +201,28 @@ static void file_refresh(const bContext *C, ScrArea *sa)
filelist_sort(sfile->files, params->sort);
}
BLI_strncpy(params->dir, filelist_dir(sfile->files), FILE_MAX);
- thumbnails_start(sfile->files, params, C);
+ if(params->display == FILE_IMGDISPLAY) {
+ 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, params, C);
+ if(params->display == FILE_IMGDISPLAY) {
+ thumbnails_start(sfile->files, C);
+ }
} else {
+ if(params->display == FILE_IMGDISPLAY) {
+ if (!thumbnails_running(sfile->files,C)) {
+ thumbnails_start(sfile->files, C);
+ }
+ } else {
+ /* stop any running thumbnail jobs if we're not
+ displaying them - speedup for NFS */
+ thumbnails_stop(sfile->files, C);
+ }
filelist_filter(sfile->files);
}
-
}
if (params->renamefile[0] != '\0') {