From 03f43664223e7bf57aba04f81bc3737c6ab63285 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 11 Jun 2010 17:35:31 +0300 Subject: EXT-7792 FIXED Made Wear button disabled if there are no selected outfit (or list is empty). Also fixed some issues in accordion caused by removing My Outfits content via Inventory: - updated accordion's help text to not shown nothing if there are no any tabs and filter substring is empty. - added check of necessity to show help text when accordion "arrange" Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/568/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitsinventory.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpaneloutfitsinventory.cpp') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 1286642897..1e1e1aaf9b 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -528,11 +528,12 @@ void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); bool wear_enabled = isActionEnabled("wear"); + bool wear_visible = !isCOFPanelActive(); bool make_outfit_enabled = isActionEnabled("save_outfit"); mListCommands->childSetEnabled("trash_btn", trash_enabled); mListCommands->childSetEnabled("wear_btn", wear_enabled); - mListCommands->childSetVisible("wear_btn", wear_enabled); + mListCommands->childSetVisible("wear_btn", wear_visible); mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled); } @@ -691,6 +692,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) { return FALSE; } + return hasItemsSelected(); } if (command_name == "save_outfit") { @@ -713,7 +715,6 @@ bool LLPanelOutfitsInventory::hasItemsSelected() { bool has_items_selected = false; - // TODO: add handling "My Outfits" tab. if (isCOFPanelActive()) { LLFolderView* root = getActivePanel()->getRootFolder(); @@ -723,6 +724,10 @@ bool LLPanelOutfitsInventory::hasItemsSelected() has_items_selected = (selection_set.size() > 0); } } + else // My Outfits Tab is active + { + has_items_selected = mMyOutfitsPanel->getSelectedOutfitUUID().notNull(); + } return has_items_selected; } -- cgit v1.2.3