[Bf-blender-cvs] [a83d40c497c] temp-asset-library-all: Fix all library always tagging catalogs as changed
Julian Eisel
noreply at git.blender.org
Mon Jan 9 12:44:08 CET 2023
Commit: a83d40c497c9ad78968c0e7ef3b1a832a33d5974
Author: Julian Eisel
Date: Mon Jan 9 12:43:36 2023 +0100
Branches: temp-asset-library-all
https://developer.blender.org/rBa83d40c497c9ad78968c0e7ef3b1a832a33d5974
Fix all library always tagging catalogs as changed
===================================================================
M source/blender/asset_system/AS_asset_catalog.hh
M source/blender/asset_system/intern/asset_catalog.cc
M source/blender/asset_system/intern/asset_library_service.cc
===================================================================
diff --git a/source/blender/asset_system/AS_asset_catalog.hh b/source/blender/asset_system/AS_asset_catalog.hh
index 1d5401f0b0e..8f818c6a768 100644
--- a/source/blender/asset_system/AS_asset_catalog.hh
+++ b/source/blender/asset_system/AS_asset_catalog.hh
@@ -299,7 +299,7 @@ class AssetCatalogCollection {
std::unique_ptr<AssetCatalogCollection> deep_copy() const;
/**
* Copy the catalogs from \a other and append them to this collection. Copies no other data
- * otherwise (but marks as having unsaved changes).
+ * otherwise.
*/
void add_catalogs_from_existing(const AssetCatalogCollection &other);
diff --git a/source/blender/asset_system/intern/asset_catalog.cc b/source/blender/asset_system/intern/asset_catalog.cc
index 0be1d8aa30b..6fd01ab14f7 100644
--- a/source/blender/asset_system/intern/asset_catalog.cc
+++ b/source/blender/asset_system/intern/asset_catalog.cc
@@ -689,7 +689,6 @@ static void copy_catalog_map_into_existing(const OwningAssetCatalogMap &source,
void AssetCatalogCollection::add_catalogs_from_existing(const AssetCatalogCollection &other)
{
- has_unsaved_changes_ = true;
copy_catalog_map_into_existing(other.catalogs_, catalogs_);
}
diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc
index d2bd6ff36c2..1c212cb1136 100644
--- a/source/blender/asset_system/intern/asset_library_service.cc
+++ b/source/blender/asset_system/intern/asset_library_service.cc
@@ -158,7 +158,7 @@ AssetLibrary *AssetLibraryService::get_asset_library_all(const Main *bmain)
all_library.catalog_service = std::make_unique<AssetCatalogService>(
AssetCatalogService::read_only_tag());
- /* (Re-)load catalogs on refresh. */
+ /* (Re-)load catalogs on refresh, and merge them into the all library. */
AssetLibrary::foreach_loaded(
[&](AssetLibrary &nested) {
/* On first load the catalogs were read just above, no need to reload. */
More information about the Bf-blender-cvs
mailing list