diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-18 12:24:21 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-18 12:24:21 +0100 |
commit | 333f60ef3cf1a5ac4ce7687faf8369e7d0a4b2de (patch) | |
tree | edb2169b848d848d834fe6e418c397c10c89a5ff /indra/newview/llpaneloutfitsinventory.cpp | |
parent | cb50a2395bc37f1f7833171a976f67af9f2df66d (diff) | |
parent | 9aa710945685a2cae8cfc622f3dc3d900c1ab4c9 (diff) |
merge from PE's viewer-release
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 7e1bff0961..714d9cd4c5 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -191,6 +191,10 @@ private: { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } + else if ("take_off" == param) + { + return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id); + } return true; } @@ -209,10 +213,6 @@ private: { return !is_worn; } - else if ("take_off" == param) - { - return is_worn; - } return true; } @@ -224,7 +224,6 @@ private: LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mMyOutfitsPanel(NULL), mCurrentOutfitPanel(NULL), - mParent(NULL), mGearMenu(NULL), mInitialized(false) { @@ -314,11 +313,6 @@ void LLPanelOutfitsInventory::updateVerbs() } } -void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) -{ - mParent = parent; -} - // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { @@ -548,7 +542,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); - bool wear_enabled = isActionEnabled("wear"); + bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear"); bool wear_visible = !isCOFPanelActive(); bool make_outfit_enabled = isActionEnabled("save_outfit"); @@ -667,7 +661,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) else // "My Outfits" tab active { const LLUUID& selected_outfit = mMyOutfitsPanel->getSelectedOutfitUUID(); - can_delete = LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit); + // first condition prevents trash btn from enabling when items are selected inside outfit (EXT-7847) + can_delete = !mMyOutfitsPanel->hasItemSelected() && LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit); } return can_delete; @@ -827,12 +822,6 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const void LLPanelOutfitsInventory::setWearablesLoading(bool val) { mListCommands->childSetEnabled("wear_btn", !val); - - llassert(mParent); - if (mParent) - { - mParent->setWearablesLoading(val); - } } void LLPanelOutfitsInventory::onWearablesLoaded() |