diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-01 01:33:30 +0200 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-02-01 16:38:47 +0200 |
commit | 999c8cd3b92cdc64549167a261c8c629edc03c55 (patch) | |
tree | f8d0d25345e84b11a84357bcb0e40fb9aa0297ab /indra/llinventory | |
parent | 6ada89ce0b9372d6a7f49ac45bad6713ad5d3355 (diff) |
SL-19117 Textures should return asset id when thumbnail is not set
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 11 | ||||
-rw-r--r-- | indra/llinventory/llinventory.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index b897198d10..e00f652622 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -349,6 +349,7 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other) copyObject(other); mPermissions = other->mPermissions; mAssetUUID = other->mAssetUUID; + mThumbnailUUID = other->mThumbnailUUID; mDescription = other->mDescription; mSaleInfo = other->mSaleInfo; mInventoryType = other->mInventoryType; @@ -413,6 +414,7 @@ U32 LLInventoryItem::getCRC32() const //LL_DEBUGS() << "8 crc: " << std::hex << crc << std::dec << LL_ENDL; crc += (U32)mCreationDate; //LL_DEBUGS() << "9 crc: " << std::hex << crc << std::dec << LL_ENDL; + crc += mThumbnailUUID.getCRC32(); return crc; } @@ -502,6 +504,15 @@ void LLInventoryItem::setSaleInfo(const LLSaleInfo& sale_info) mSaleInfo = sale_info; } +const LLUUID& LLInventoryItem::getThumbnailUUID() const +{ + if (mThumbnailUUID.isNull() && mType == LLAssetType::AT_TEXTURE) + { + return mAssetUUID; + } + return mThumbnailUUID; +} + LLInventoryType::EType LLInventoryItem::getInventoryType() const { return mInventoryType; diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index dfe8b7659b..7af542c49a 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -162,6 +162,7 @@ public: virtual const std::string& getDescription() const; virtual const std::string& getActualDescription() const; // Does not follow links virtual const LLSaleInfo& getSaleInfo() const; + virtual const LLUUID& getThumbnailUUID() const; virtual LLInventoryType::EType getInventoryType() const; virtual U32 getFlags() const; virtual time_t getCreationDate() const; |