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.
This commit is contained in:
Julian Eisel 2021-04-29 13:15:42 +02:00
parent 4e10b196ac
commit 88400f0c03
Notes: blender-bot 2024-01-16 18:05:25 +01:00
Referenced by commit 41945454f7, Correction to own previous commit: Add missing break
1 changed files with 8 additions and 0 deletions

View File

@ -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: