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:
authorJulian Eisel <julian@blender.org>2022-02-24 14:40:40 +0300
committerJulian Eisel <julian@blender.org>2022-02-24 14:40:40 +0300
commitd48e595c7873469cef54902af15c26544994d36d (patch)
treeb5a265d23194773a50efb18b390ebba9c305c27b
parentb0eed6fb9a4010d45fe7b73cc8ad0c97eb871cbf (diff)
Fix wrong asset library displayed/loaded in asset view templates
Sometimes when switching asset libraries in the asset view templates (like the pose library sidebar UI), the wrong library would end up being shown.
-rw-r--r--source/blender/editors/asset/intern/asset_library_reference.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/asset/intern/asset_library_reference.cc b/source/blender/editors/asset/intern/asset_library_reference.cc
index 04f77821114..5096b9d653d 100644
--- a/source/blender/editors/asset/intern/asset_library_reference.cc
+++ b/source/blender/editors/asset/intern/asset_library_reference.cc
@@ -17,9 +17,9 @@ AssetLibraryReferenceWrapper::AssetLibraryReferenceWrapper(const AssetLibraryRef
bool operator==(const AssetLibraryReferenceWrapper &a, const AssetLibraryReferenceWrapper &b)
{
- return (a.type == b.type) && (a.type == ASSET_LIBRARY_CUSTOM) ?
- (a.custom_library_index == b.custom_library_index) :
- true;
+ return (a.type == b.type) &&
+ ((a.type == ASSET_LIBRARY_CUSTOM) ? (a.custom_library_index == b.custom_library_index) :
+ true);
}
uint64_t AssetLibraryReferenceWrapper::hash() const