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-10-26 20:21:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-26 20:21:22 +0300
commit7bffddfa6e877bd6e66cf5641515ebd07267f145 (patch)
treeab8bdf483847ef26769271813d6f45def407c038 /source/blender/editors/space_file/filesel.c
parenta062d86230a07caf022b105f395a6b47dc604040 (diff)
Don't deselect assets in `ED_fileselect_activate_by_id`
`ED_fileselect_activate_by_id()` activates an asset (i.e. marks it as the active asset in the asset browser). To avoid an "active but not selected" state, it also selects it. Before this commit, the function would also deselect all other assets, but that's considered doing too much. If deselection is required, the `ED_fileselect_deselect_all()` function can be called. Manifest Task: T92152
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 2b4f14451e7..4cd05237138 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -514,14 +514,12 @@ void ED_fileselect_activate_by_id(SpaceFile *sfile, ID *asset_id, const bool def
const FileDirEntry *file = filelist_file_ex(files, file_index, false);
if (filelist_file_get_id(file) != asset_id) {
- filelist_entry_select_set(files, file, FILE_SEL_REMOVE, FILE_SEL_SELECTED, CHECK_ALL);
continue;
}
params->active_file = file_index;
filelist_entry_select_set(files, file, FILE_SEL_ADD, FILE_SEL_SELECTED, CHECK_ALL);
-
- /* Keep looping to deselect the other files. */
+ break;
}
WM_main_add_notifier(NC_ASSET | NA_ACTIVATED, NULL);