diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-22 17:35:18 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-22 17:35:18 +0300 |
commit | cd6fc651cec1d45e206ba5dce38dd120e2e8a8c4 (patch) | |
tree | 830782e262b2192796cffd5023d0869c88781c45 /source/blender/editors/asset/intern | |
parent | 85312f2236784716fc24cc5d3236cb016fb99828 (diff) |
Asset Browser: add notifiers on catalog edits
Send out notifications on catalog edits. This way all asset browsers will
refresh when catalogs are edited.
Diffstat (limited to 'source/blender/editors/asset/intern')
-rw-r--r-- | source/blender/editors/asset/intern/asset_catalog.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/asset/intern/asset_catalog.cc b/source/blender/editors/asset/intern/asset_catalog.cc index af8128ffb8a..dae960cbb0a 100644 --- a/source/blender/editors/asset/intern/asset_catalog.cc +++ b/source/blender/editors/asset/intern/asset_catalog.cc @@ -77,6 +77,7 @@ AssetCatalog *ED_asset_catalog_add(::AssetLibrary *library, } catalog_service->tag_has_unsaved_changes(new_catalog); + WM_main_add_notifier(NC_SPACE | ND_SPACE_ASSET_PARAMS, nullptr); return new_catalog; } @@ -91,6 +92,7 @@ void ED_asset_catalog_remove(::AssetLibrary *library, const CatalogID &catalog_i catalog_service->undo_push(); catalog_service->tag_has_unsaved_changes(nullptr); catalog_service->prune_catalogs_by_id(catalog_id); + WM_main_add_notifier(NC_SPACE | ND_SPACE_ASSET_PARAMS, nullptr); } void ED_asset_catalog_rename(::AssetLibrary *library, @@ -116,6 +118,7 @@ void ED_asset_catalog_rename(::AssetLibrary *library, catalog_service->undo_push(); catalog_service->tag_has_unsaved_changes(catalog); catalog_service->update_catalog_path(catalog_id, new_path); + WM_main_add_notifier(NC_SPACE | ND_SPACE_ASSET_PARAMS, nullptr); } void ED_asset_catalogs_save_from_main_path(::AssetLibrary *library, const Main *bmain) |