diff options
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bc1a3cd0af..ca9ebf8dc1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4445,9 +4445,27 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Wearable Edit")); } - if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) + // Disable wear and take off based on whether the item is worn. + if(item) { - items.push_back(std::string("Take Off")); + switch (item->getType()) + { + case LLAssetType::AT_CLOTHING: + items.push_back(std::string("Take Off")); + case LLAssetType::AT_BODYPART: + if (gAgentWearables.isWearingItem(item->getUUID())) + { + disabled_items.push_back(std::string("Wearable Wear")); + disabled_items.push_back(std::string("Wearable Add")); + } + else + { + disabled_items.push_back(std::string("Take Off")); + } + break; + default: + break; + } } } hideContextEntries(menu, items, disabled_items); |