diff options
author | Julian Eisel <julian@blender.org> | 2020-12-15 18:58:30 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-15 19:03:49 +0300 |
commit | 990406e1ff9371a8c896b71171caa876cfdff2f6 (patch) | |
tree | dc726d606be0df6c549bb63a09484e473b3dd2d9 /source/blender/editors/space_file/space_file.c | |
parent | 7dc8db7cd135e7b26fccc1cc6728cac8b510de70 (diff) |
Fix crash when deleting/renaming asset library while it's visible
Storing the asset library reference by name wasn't a good idea, I thought it
would work with a careful fallback, but it's easier to just use the index
instead. So change to using indices, make sure fallback methods work reliable
and make sure the file list is updated when asset libraries are removed.
I added a new notifier type for the latter, I prefer not using file notifiers
in asset-library/preferences code. We have more than enough values for
notifiers left.
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 8be02b952a8..09b7e5b348c 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -412,6 +412,11 @@ static void file_listener(wmWindow *UNUSED(win), ED_area_tag_refresh(area); } break; + case ND_SPACE_ASSET_PARAMS: + if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS) { + ED_area_tag_refresh(area); + } + break; } break; case NC_ASSET: { |