diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-22 17:31:25 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-22 17:31:32 +0300 |
commit | 16ffa7bb6e519edd039683fe83031542d7059d96 (patch) | |
tree | 3d9eee7e90d10036bc91289418f72db70eae1539 /source | |
parent | 76ebc10794a4bb66a1b94339fd8873dc23f1247c (diff) |
Asset Catalogs: push undo step before saving to disk
Since writing asset catalogs to disk also means loading any on-disk
changes, it's a good idea to store an undo step.
Diffstat (limited to 'source')
-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 f8b33e76447..98f017db20c 100644 --- a/source/blender/editors/asset/intern/asset_catalog.cc +++ b/source/blender/editors/asset/intern/asset_catalog.cc @@ -121,6 +121,9 @@ void ED_asset_catalogs_save_from_main_path(::AssetLibrary *library, const Main * return; } + /* Since writing to disk also means loading any on-disk changes, it may be a good idea to store + * an undo step. */ + catalog_service->undo_push(); catalog_service->write_to_disk(bmain->name); } |