[Bf-blender-cvs] [7ca40c1] master: File Browser: Two more minor fixes for arrow keys selection
Julian Eisel
noreply at git.blender.org
Fri Jun 12 06:26:21 CEST 2015
Commit: 7ca40c1061d156261aab18656b31061c1d31d920
Author: Julian Eisel
Date: Fri Jun 12 06:25:43 2015 +0200
Branches: master
https://developer.blender.org/rB7ca40c1061d156261aab18656b31061c1d31d920
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)
===================================================================
M source/blender/editors/space_file/file_ops.c
M source/blender/editors/space_file/filesel.c
===================================================================
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 4889b77..db93000 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 0578613..66eb79a 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)
More information about the Bf-blender-cvs
mailing list