diff options
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 3d350606c6..303031ab29 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -221,7 +221,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: @@ -263,6 +269,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: |