diff options
author | Brad Linden <brad@lindenlab.com> | 2023-11-02 16:35:39 -0700 |
---|---|---|
committer | Brad Linden <brad@lindenlab.com> | 2023-11-03 09:50:03 -0700 |
commit | 826310bcab9df0ae79d805ca1f4d1842cbeb2ed2 (patch) | |
tree | 20c12d9619502c764f28c90fba99487c4dab4545 /indra/llinventory | |
parent | b9b38db5678556e1aa2710a86004dc5a14f97242 (diff) |
Fixed INV_THUMBNAIL_LABEL handling missed in rebase for SL-19968 work
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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: + <key> asset_id </key> + <uuid> acc0ec86 - 17f2 - 4b92 - ab41 - 6718b1f755f7 </uuid> + <key> perms </key> + <integer> 8 </integer> + <key>service</key> + <integer> 3 </integer> + <key>version</key> + <integer> 1 </key> + */ + } + + if (i->first == INV_THUMBNAIL_ID_LABEL) + { + mThumbnailUUID = i->second.asUUID(); + } + if (i->first == INV_PERMISSIONS_LABEL) { mPermissions = ll_permissions_from_sd(i->second); |