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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-01-05 14:23:41 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-05 14:23:41 +0300
commit89b654dc56b38a332e5bc4f82109152e21f0a5b6 (patch)
tree0c52cf9c418917fb2408207388d8b555a1210283 /source/blender/editors/space_file/filesel.c
parentcaf5a325b014e77e8a19fb8e40a3780964b609b6 (diff)
FileBrowser: small tweak to new search feature: clear that string when changing dir.
In 99% of cases, you do not want to keep the same filter when changing dir, and having to reset it by hand is *very* annoying!
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index bba5981b3b8..3e663275dcd 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -603,9 +603,12 @@ void file_change_dir(bContext *C, int checkdir)
SpaceFile *sfile = CTX_wm_space_file(C);
if (sfile->params) {
-
ED_fileselect_clear(wm, sfile);
+ /* Clear search string, it is very rare to want to keep that filter while changing dir,
+ * and usually very annoying to keep it actually! */
+ sfile->params->filter_search[0] = '\0';
+
if (checkdir && !BLI_is_dir(sfile->params->dir)) {
BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), sizeof(sfile->params->dir));
/* could return but just refresh the current dir */