[Bf-blender-cvs] [d48e595c787] master: Fix wrong asset library displayed/loaded in asset view templates

Julian Eisel noreply at git.blender.org
Thu Feb 24 12:42:31 CET 2022


Commit: d48e595c7873469cef54902af15c26544994d36d
Author: Julian Eisel
Date:   Thu Feb 24 12:40:40 2022 +0100
Branches: master
https://developer.blender.org/rBd48e595c7873469cef54902af15c26544994d36d

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.

===================================================================

M	source/blender/editors/asset/intern/asset_library_reference.cc

===================================================================

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



More information about the Bf-blender-cvs mailing list