summaryrefslogtreecommitdiff
path: root/indra/llinventory/llinventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-06-24 21:36:42 +0000
committerLoren Shih <seraph@lindenlab.com>2009-06-24 21:36:42 +0000
commita00af78b95a62c613f9a2ac4a28a0017086c5ffa (patch)
tree25c46a6508a77d9b250fe166d7b0692983dc98f2 /indra/llinventory/llinventory.cpp
parent2ce76c7ed47b49f8a7bafe69bdea064189e1ccbd (diff)
merge -r125267:125272 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/inventory-links__merge__viewer2.0.0-3-r125202 to svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
-rw-r--r--indra/llinventory/llinventory.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index adc80b2ed3..597e19e7ea 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -126,6 +126,20 @@ const std::string& LLInventoryObject::getName() const
return mName;
}
+// To bypass linked items, since llviewerinventory's getType
+// will return the linked-to item's type instead of this object's type.
+LLAssetType::EType LLInventoryObject::getActualType() const
+{
+ return mType;
+}
+
+// See LLInventoryItem override.
+// virtual
+const LLUUID& LLInventoryObject::getLinkedUUID() const
+{
+ return mUUID;
+}
+
LLAssetType::EType LLInventoryObject::getType() const
{
return mType;
@@ -333,6 +347,19 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
mCreationDate = other->mCreationDate;
}
+// If this is a linked item, then the UUID of the base object is
+// this item's assetID.
+// virtual
+const LLUUID& LLInventoryItem::getLinkedUUID() const
+{
+ if (LLAssetType::lookupIsLinkType(getActualType()))
+ {
+ return mAssetUUID;
+ }
+
+ return LLInventoryObject::getLinkedUUID();
+}
+
const LLPermissions& LLInventoryItem::getPermissions() const
{
return mPermissions;