summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitsinventory.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-06-23 15:30:48 +0300
committerMike Antipov <mantipov@productengine.com>2010-06-23 15:30:48 +0300
commit08381a276dbf0544692c44236b40f57ec111aefc (patch)
tree3caf6a9e0176874976e753a4ec5f3df259759553 /indra/newview/llpaneloutfitsinventory.cpp
parent6290930c98ace2d3b3d76d3be0a06df718a9a238 (diff)
EXT-7755 ADDITIONAL FIX Fixed issues with wrong title after an outfit from the Inventory is worn, "Wear..." menu items state is made consistent with "Wear" button.
* Empty string is replaced with "Changing outfits" while changing COF; * Fixed title to show "No Outfit" after an outfit from the Inventory is worn; * Fixed bug with visible indicator after an empty folder is DnD from the Inventory "Clothing" * Updated context and Gear "Wear..." menu items to take into account "isCOFChangeInProgress" state in on_enable callbacks Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/625/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index d382c77430..77c135c716 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -72,11 +72,13 @@ static const std::string COF_TAB_NAME = "cof_tab";
static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
+class LLPanelOutfitsInventory;
class LLOutfitListGearMenu
{
public:
- LLOutfitListGearMenu(LLOutfitsList* olist)
+ LLOutfitListGearMenu(LLOutfitsList* olist, LLPanelOutfitsInventory* parent_panel)
: mOutfitList(olist),
+ mMyOutfitsPanel(parent_panel),
mMenu(NULL)
{
llassert_always(mOutfitList);
@@ -209,6 +211,11 @@ private:
{
return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id);
}
+ else if ("wear" == param)
+ {
+ return mMyOutfitsPanel->isActionEnabled(param);
+ }
+
return true;
}
@@ -233,6 +240,7 @@ private:
LLOutfitsList* mOutfitList;
LLMenuGL* mMenu;
+ LLPanelOutfitsInventory* mMyOutfitsPanel;
};
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
@@ -550,13 +558,13 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
, _7 // EAcceptance* accept
));
- mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel);
+ mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel, this);
}
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
- bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear");
+ bool wear_enabled = isActionEnabled("wear");
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
@@ -710,6 +718,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "wear")
{
+ if (gAgentWearables.isCOFChangeInProgress()) return FALSE;
+
if (isCOFPanelActive())
{
return FALSE;