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:
authorSybren A. Stüvel <sybren@blender.org>2021-10-12 15:45:11 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-12 15:45:11 +0300
commit74ea21ec9dfdff4c5b1c00092427c49044343ca9 (patch)
tree6a13d30217fea12867fad68c21a82b21ec1afde3 /source/blender/blenkernel/intern/asset_catalog.cc
parentf1d97a308d4a588694cdd41db57197576f1432c0 (diff)
Asset Catalogs: expose undo/redo operators to UI
Ensure that catalog operations create an undo snapshot, and show undo/redo operators in the asset browser. A hidden operator `ASSET_OT_catalog_undo_push` is also added such that add-ons can also set undo snapshots if they need.
Diffstat (limited to 'source/blender/blenkernel/intern/asset_catalog.cc')
-rw-r--r--source/blender/blenkernel/intern/asset_catalog.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/asset_catalog.cc b/source/blender/blenkernel/intern/asset_catalog.cc
index 2d4956e7e25..2e01d3cdcea 100644
--- a/source/blender/blenkernel/intern/asset_catalog.cc
+++ b/source/blender/blenkernel/intern/asset_catalog.cc
@@ -485,6 +485,7 @@ void AssetCatalogService::undo()
redo_snapshots_.append(std::move(catalog_collection_));
catalog_collection_ = std::move(undo_snapshots_.pop_last());
+ rebuild_tree();
}
void AssetCatalogService::redo()
@@ -493,6 +494,7 @@ void AssetCatalogService::redo()
undo_snapshots_.append(std::move(catalog_collection_));
catalog_collection_ = std::move(redo_snapshots_.pop_last());
+ rebuild_tree();
}
void AssetCatalogService::undo_push()