[Bf-blender-cvs] [a1c8d69] asset-experiments: Fix windows bug with scons builds.

Bastien Montagne noreply at git.blender.org
Wed Jul 1 16:43:32 CEST 2015


Commit: a1c8d693a8acf80893e2010a07d908d6f6c2894b
Author: Bastien Montagne
Date:   Wed Jul 1 16:40:07 2015 +0200
Branches: asset-experiments
https://developer.blender.org/rBa1c8d693a8acf80893e2010a07d908d6f6c2894b

Fix windows bug with scons builds.

Classical bool vs char value mismatch... Here it was leading to a constant re-filtering
of the list, which invalidates cached previews.

Strange thing is, it would look as if Windows CMake builds are using 'real' bool,
while scons ones are using fake char-based one?

===================================================================

M	source/blender/editors/space_file/filelist.c
M	source/blender/editors/space_file/space_file.c

===================================================================

diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 76f7d6f..576ef10 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -725,11 +725,11 @@ void filelist_setfilter_options(FileList *filelist, const bool hide_dot, const b
 {
 	bool update = false;
 
-	if (((filelist->filter_data.flags & FLF_HIDE_DOT) != 0) != hide_dot) {
+	if (((filelist->filter_data.flags & FLF_HIDE_DOT) != 0) != (hide_dot != 0)) {
 		filelist->filter_data.flags ^= FLF_HIDE_DOT;
 		update = true;
 	}
-	if (((filelist->filter_data.flags & FLF_HIDE_PARENT) != 0) != hide_parent) {
+	if (((filelist->filter_data.flags & FLF_HIDE_PARENT) != 0) != (hide_parent != 0)) {
 		filelist->filter_data.flags ^= FLF_HIDE_PARENT;
 		update = true;
 	}
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index a90440c..ee4df9e 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -223,7 +223,7 @@ static void file_refresh(const bContext *C, ScrArea *sa)
 	filelist_setdir(sfile->files, params->dir);
 	filelist_setrecursion(sfile->files, params->recursion_level);
 	filelist_setsorting(sfile->files, params->sort);
-	filelist_setfilter_options(sfile->files, params->flag & FILE_HIDE_DOT,
+	filelist_setfilter_options(sfile->files, (params->flag & FILE_HIDE_DOT) != 0,
 	                                         false, /* TODO hide_parent, should be controllable? */
 	                                         params->flag & FILE_FILTER ? params->filter : 0,
 	                                         params->filter_id,




More information about the Bf-blender-cvs mailing list