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:
authorJulian Eisel <eiseljulian@gmail.com>2015-06-12 07:25:43 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-06-12 07:25:43 +0300
commit7ca40c1061d156261aab18656b31061c1d31d920 (patch)
tree7c06ee42fefd56d9071f57f556ef4173482a6454 /source/blender/editors/space_file
parent220595027498b8e55c071b2388ac3be2859b94af (diff)
File Browser: Two more minor fixes for arrow keys selection
* Unset active file on opening/resetting file list * Accidentally placed NULL check in the middle of the function - not a big deal as it's highly unlikely that it fails (removed it but added assert)
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_file/filesel.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 4889b775849..db93000ef7c 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -476,6 +476,8 @@ static bool file_walk_select_selection_set(
int active = active_old; /* could use active_old instead, just for readability */
bool deselect = false;
+ BLI_assert(params);
+
if (has_selection) {
if (extend &&
filelist_is_selected(files, active_old, FILE_SEL_SELECTED) &&
@@ -512,7 +514,7 @@ static bool file_walk_select_selection_set(
}
}
- if (!params || active < 0) {
+ if (active < 0) {
return false;
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 05786139845..66eb79abae2 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -250,6 +250,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* operator has no setting for this */
params->sort = FILE_SORT_ALPHA;
+ params->active_file = -1;
/* initialize the list with previous folders */
@@ -283,6 +284,7 @@ void ED_fileselect_reset_params(SpaceFile *sfile)
sfile->params->type = FILE_UNIX;
sfile->params->flag = 0;
sfile->params->title[0] = '\0';
+ sfile->params->active_file = -1;
}
int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *ar)