From bb2ee49fb0a618058032e19df0fb935b213b05f0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Jun 2017 21:55:24 +0200 Subject: [PATCH] Backed out changeset 02868e5d5ec4 to make room for LL fix --- indra/newview/llinventorybridge.cpp | 82 ++++++++++++++--------------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8dfae2f6b5..6ce2f179a0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4443,60 +4443,58 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - // FIRE-21246 re-enable context menus for remove from COF on system folders and reinstate wearables separator - if (is_agent_inventory) + // Only enable add/replace outfit for non-system folders. + if (!is_system_folder) { - items.push_back(std::string("Folder Wearables Separator")); - // Only enable add/replace outfit for non-system folders. - if (!is_system_folder) + // FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder + items.push_back(std::string("Add To Outfit")); + + // Adding an outfit onto another (versus replacing) doesn't make sense. + if (type != LLFolderType::FT_OUTFIT) { // FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder - items.push_back(std::string("Add To Outfit")); - - // Adding an outfit onto another (versus replacing) doesn't make sense. - if (type != LLFolderType::FT_OUTFIT) + //items.push_back(std::string("Add To Outfit")); + // Patch: ReplaceWornItemsOnly + items.push_back(std::string("Wear Items")); + // + } + + items.push_back(std::string("Replace Outfit")); + + if (is_agent_inventory) + { + items.push_back(std::string("Folder Wearables Separator")); + if (is_ensemble) { - // FIRE-3302: "Add to Current Outfit" missing for inventory outfit folder - //items.push_back(std::string("Add To Outfit")); - // Patch: ReplaceWornItemsOnly - items.push_back(std::string("Wear Items")); - // + items.push_back(std::string("Wear As Ensemble")); + } + items.push_back(std::string("Remove From Outfit")); + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) + { + disabled_items.push_back(std::string("Remove From Outfit")); } - - items.push_back(std::string("Replace Outfit")); } - - if (is_ensemble) - { - items.push_back(std::string("Wear As Ensemble")); - } - items.push_back(std::string("Remove From Outfit")); - if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) - { - disabled_items.push_back(std::string("Remove From Outfit")); - } - } - // (change also outdents the next 3 if blocks with no fucntional impact) // if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4) - if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || - ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) + if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || + ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) // [/SL:KB] - { - disabled_items.push_back(std::string("Replace Outfit")); - } + { + disabled_items.push_back(std::string("Replace Outfit")); + } // [RLVa:KB] - Checked: RLVa-2.0.3 - // Block "Replace Current Outfit" if the user can't wear the new folder - if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(mUUID, RLV_LOCK_ADD)) ) - { - disabled_items.push_back(std::string("Replace Outfit")); - } + // Block "Replace Current Outfit" if the user can't wear the new folder + if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().isLockedFolder(mUUID, RLV_LOCK_ADD)) ) + { + disabled_items.push_back(std::string("Replace Outfit")); + } // [/RLVa:KB] - if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) - { - disabled_items.push_back(std::string("Add To Outfit")); + if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID)) + { + disabled_items.push_back(std::string("Add To Outfit")); + } + items.push_back(std::string("Outfit Separator")); } - items.push_back(std::string("Outfit Separator")); } }