From d48e595c7873469cef54902af15c26544994d36d Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 24 Feb 2022 12:40:40 +0100 Subject: 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. --- source/blender/editors/asset/intern/asset_library_reference.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/asset') 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 -- cgit v1.2.3