Fix unintended reloading of asset catalog files from disk

Mistake in #118463.

Updating the catalogs of the "All" asset library would also reload
catalog data of the other asset libraries from disk. This wasn't
intended, this should be done with an explicit load request only (and on
a thread to not block the main thread).
This commit is contained in:
Julian Eisel 2024-02-23 12:53:07 +01:00
parent 7f2193ff9e
commit 49c7dfe904

@ -197,7 +197,11 @@ void AssetLibraryService::tag_all_library_catalogs_dirty()
void AssetLibraryService::reload_all_library_catalogs_if_dirty()
{
if (all_library_ && all_library_->is_catalogs_dirty()) {
all_library_->refresh_catalogs();
/* Don't reload catalogs from nested libraries from disk, just reflect their currently known
* state in the "All" library. Loading catalog changes from disk is only done with a
* #AS_asset_library_load()/#AssetLibraryService:get_asset_library() call. */
const bool reload_nested_catalogs = false;
all_library_->rebuild_catalogs_from_nested(reload_nested_catalogs);
}
}