summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAaron Terrell (Enus) <enus@lindenlab.com>2010-08-30 11:56:33 -0700
committerAaron Terrell (Enus) <enus@lindenlab.com>2010-08-30 11:56:33 -0700
commitd04e8d757575dbb50877ef861adcfde427837bb6 (patch)
treeb214237a4246e523754b356b003d1d2a163f21ab /indra/newview/llinventoryfunctions.cpp
parent3172b4db1ee4d2059d2605ce616bdb10c840fc03 (diff)
parentd84c6625c707b5d61b71749b74f3cc4fb8f02048 (diff)
merging up from viewer-development
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e814cf012e..f3d9639dee 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -215,7 +215,13 @@ BOOL get_is_item_worn(const LLUUID& id)
const LLViewerInventoryItem* item = gInventory.getItem(id);
if (!item)
return FALSE;
-
+
+ // Consider the item as worn if it has links in COF.
+ if (LLAppearanceMgr::instance().isLinkInCOF(id))
+ {
+ return TRUE;
+ }
+
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
@@ -257,6 +263,16 @@ BOOL get_can_item_be_worn(const LLUUID& id)
return FALSE;
}
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(
+ LLFolderType::FT_TRASH);
+
+ // item can't be worn if base obj in trash, see EXT-7015
+ if (gInventory.isObjectDescendentOf(item->getLinkedUUID(),
+ trash_id))
+ {
+ return false;
+ }
+
switch(item->getType())
{
case LLAssetType::AT_OBJECT: