summaryrefslogtreecommitdiff
path: root/indra/llinventory/llinventory.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-06-29 11:43:20 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-06-29 11:43:20 -0700
commit87918b4bfe27ddcba2e4a44323ebc85e509a92fc (patch)
treee37cc81e7b6292750941e767d33910fd95f20bb6 /indra/llinventory/llinventory.cpp
parentb74af1c2aa4d8804a240135f54df7d3c21ce3ab6 (diff)
parentcb8641a639d077fe03853e69be597ee359f5a01f (diff)
Merge with 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;