From d39ef5ce6fd52a66189e3e14da3a01b14b1d99a2 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 5 May 2010 13:19:24 +0300 Subject: Implemented task EXT-7156 (Appearance panel: "Wear" button should become disabled and a loading indicator should appear next to the outfit name). When user presses the "Wear" button in the outfits list, we disable the button and display a perpetual loading indicator until all wearables of the outfit being worn get loaded. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/347/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitsinventory.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llpaneloutfitsinventory.cpp') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 59c1fb4f3c..e36e63521e 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -77,6 +77,7 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() : { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); + gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -190,6 +191,7 @@ void LLPanelOutfitsInventory::onWearButtonClick() if (!isCOFPanelActive()) { mMyOutfitsPanel->performAction("replaceoutfit"); + setWearablesLoading(true); } else { @@ -642,3 +644,19 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const { return (childGetVisibleTab("appearance_tabs")->getName() == COF_TAB_NAME); } + +void LLPanelOutfitsInventory::setWearablesLoading(bool val) +{ + mListCommands->childSetEnabled("wear_btn", !val); + + llassert(mParent); + if (mParent) + { + mParent->setWearablesLoading(val); + } +} + +void LLPanelOutfitsInventory::onWearablesLoaded() +{ + setWearablesLoading(false); +} -- cgit v1.2.3