summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-10 16:29:10 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-10 16:29:10 -0400
commit6d46132ef5218cd17d8d201f16e5a7df4b1e39a6 (patch)
tree1a9ea4578e12a4eac75ee43b5aa5833dd990137c /indra/llinventory
parent89e3959cf393ce9eeb058304264d4f55f4fe9ca2 (diff)
SH-4216 WIP - finished item/cat update and reorg of aisv3 code
Diffstat (limited to 'indra/llinventory')
-rwxr-xr-xindra/llinventory/llinventory.cpp11
-rwxr-xr-xindra/llinventory/llinventory.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 77b837f8ac..6336d02f22 100755
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1049,11 +1049,16 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
-bool LLInventoryItem::fromLLSD(const LLSD& sd)
+bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
{
LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE);
- mInventoryType = LLInventoryType::IT_NONE;
- mAssetUUID.setNull();
+ if (is_new)
+ {
+ // If we're adding LLSD to an existing object, need avoid
+ // clobbering these fields.
+ mInventoryType = LLInventoryType::IT_NONE;
+ mAssetUUID.setNull();
+ }
std::string w;
w = INV_ITEM_ID_LABEL;
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index cc474f3d4c..b718f0f9b7 100755
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -210,7 +210,7 @@ public:
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
LLSD asLLSD() const;
void asLLSD( LLSD& sd ) const;
- bool fromLLSD(const LLSD& sd);
+ bool fromLLSD(const LLSD& sd, bool is_new = true);
//--------------------------------------------------------------------
// Member Variables