diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-28 21:23:14 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-28 21:23:14 +0300 |
commit | 0a5eaf89bc0bbe47290629d465aa0503dd73a513 (patch) | |
tree | 969e3b0db64dc3b9d7b5e9400c7143c5e113ad27 /indra/newview | |
parent | fc84ffcbec21d63e1666e93c9453149acf2f9832 (diff) |
EXT-8258 ADDITIONAL FIX Enable the 'Trash' button in 'My Inventory' when a selected item gets worn.
This is an additional fix to the one approved in https://codereview.productengine.com/secondlife/r/772/.
Looks like sometimes get_is_item_worn() fails to determine that an item is actually worn.
I suppose it happens when the item is already linked to COF but not yet known to LLAgentWearables.
So I try fixing it by adding a COF links check to get_is_item_worn(), so that an item is considered worn as soon as it's linked to COF.
Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/822/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 86af76e0a4..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: |