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.
This commit is contained in:
Julian Eisel 2022-02-24 12:40:40 +01:00
parent b0eed6fb9a
commit d48e595c78
1 changed files with 3 additions and 3 deletions

View File

@ -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