diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-05-05 13:19:24 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-05-05 13:19:24 +0300 |
commit | d39ef5ce6fd52a66189e3e14da3a01b14b1d99a2 (patch) | |
tree | 6b6dcb98267da674ea6635c3d0f229a1438f18d0 /indra/newview/llpaneloutfitsinventory.cpp | |
parent | c4070bd67266f9dffd333221ef2ff41a88523169 (diff) |
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
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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); +} |