From 826310bcab9df0ae79d805ca1f4d1842cbeb2ed2 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 2 Nov 2023 16:35:39 -0700 Subject: Fixed INV_THUMBNAIL_LABEL handling missed in rebase for SL-19968 work --- indra/llinventory/llinventory.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 8b7a93a066..2de5af94a3 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1054,6 +1054,8 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) } #else // if 0 - new implementation follows + mThumbnailUUID.setNull(); + // iterate as map to avoid making unnecessary temp copies of everything LLSD::map_const_iterator i, end; end = sd.endMap(); @@ -1069,6 +1071,31 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) mParentUUID = i->second; } + if (i->first == INV_THUMBNAIL_LABEL) + { + const LLSD &thumbnail_map = i->second; + const std::string w = INV_ASSET_ID_LABEL; + if (thumbnail_map.has(w)) + { + mThumbnailUUID = thumbnail_map[w]; + } + /* Example: + asset_id + acc0ec86 - 17f2 - 4b92 - ab41 - 6718b1f755f7 + perms + 8 + service + 3 + version + 1 + */ + } + + if (i->first == INV_THUMBNAIL_ID_LABEL) + { + mThumbnailUUID = i->second.asUUID(); + } + if (i->first == INV_PERMISSIONS_LABEL) { mPermissions = ll_permissions_from_sd(i->second); -- cgit v1.2.3