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:
authorSybren A. Stüvel <sybren@blender.org>2021-03-08 15:57:15 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-03-08 17:21:34 +0300
commit5a67407d5aa8800faf78f40811b703d07e8f7300 (patch)
tree3b10f385b1d26d6399d6fdaa75f5792a18384369 /source/blender/editors/space_file/filelist.h
parente20b31504a2381011e60c5eadffb67f18918bc71 (diff)
File Browser: scroll selected files into view
Add operator `FILE_OT_view_selected` to the file browser (and thus also to the asset browser) that scrolls selected files into view. This includes the active file, even though it is not selected. In certain cases the active file can loose its selected state (clicking next to it, or refreshing the asset browser), but then it's still shown in the right-hand sidebar. Because of this, I found it important to take it into account when scrolling. This also includes a change to the keymaps: - Blender default: {key NUMPAD_PERIOD} is removed from the "reload" operator, and assigned to the new "view selected files" operator. The reload operator was already doubly bound, and now {key R} is the only remaining hotkey for it. - Industry compatible: {key F} is assigned to the new "view selected files" operator. This is consistent with the other "view selected" operators in other editors. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10583
Diffstat (limited to 'source/blender/editors/space_file/filelist.h')
-rw-r--r--source/blender/editors/space_file/filelist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 7eecd7a05de..9eb70dd8437 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -128,6 +128,7 @@ unsigned int filelist_entry_select_get(struct FileList *filelist,
unsigned int filelist_entry_select_index_get(struct FileList *filelist,
const int index,
FileCheckType check);
+bool filelist_entry_is_selected(struct FileList *filelist, const int index);
void filelist_entry_parent_select_set(struct FileList *filelist,
FileSelType select,
unsigned int flag,