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 <julian@blender.org>2021-04-29 14:15:42 +0300
committerJulian Eisel <julian@blender.org>2021-04-29 14:15:42 +0300
commit88400f0c03a96f5c92e251ebc24b197da80707d5 (patch)
treea7da30616d82807a3487c2bfa9052875de441e4e /source/blender/editors/space_file
parent4e10b196ac15339cfded8d5615f04ac40c93e19b (diff)
Fix incorrect sorting in Asset Browser after renaming local asset
When renaming a data-block that is an asset, while the asset is visible in the Asset Browser ("Current File" asset library), the list wouldn't re-sort items, breaking the alphabetical sorting. This was easily possible while changing the data-block name throught the Asset Browser's sidebar, while in the "Current File" asset library.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/space_file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 993b1d9b69c..4ad2e5c2fd2 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -467,6 +467,14 @@ static void file_listener(const wmSpaceTypeListenerParams *params)
break;
}
break;
+ case NC_ID: {
+ switch (wmn->action) {
+ case NA_RENAME:
+ /* Force list to update sorting (with a full reset for now). */
+ file_reset_filelist_showing_main_data(area, sfile);
+ break;
+ }
+ }
case NC_ASSET: {
switch (wmn->action) {
case NA_SELECTED: