diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-17 13:00:26 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-17 13:00:26 -0500 |
commit | 53beee9e0837865163ff700df4b8d452135da9eb (patch) | |
tree | 091ad1000bacecec6f28639bf6e1227254ac7638 /indra/newview/llsidepanelappearance.cpp | |
parent | 32dccaf3d89b40b711d69088a3e390119c7efc7f (diff) |
EXT-2569 : Separate out LLPanelOutfitsInventory so it's more modular versus being coupled with LLSidepanelAppearance
EXT-2561 : Add standard bottom panel (gear menu, add button, trash icon)
Added gear menu and standardized the code. (someday, will create a subclass to share the functionality across panels)
Make LLPanelOutfitsInventory more modular, e.g. it no longer knows about the Wear/Edit buttons.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index d92e404c2c..aeab3e2876 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -103,6 +103,7 @@ BOOL LLSidepanelAppearance::postBuild() } mPanelOutfitsInventory = dynamic_cast<LLPanelOutfitsInventory *>(getChild<LLPanel>("panel_outfits_inventory")); + mPanelOutfitsInventory->setParent(this); mLookInfo = dynamic_cast<LLPanelLookInfo*>(getChild<LLPanel>("panel_look_info")); if (mLookInfo) @@ -172,10 +173,7 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string) void LLSidepanelAppearance::onWearButtonClicked() { - if (mLookInfo->getVisible()) - { - } - else + if (!mLookInfo->getVisible()) { mPanelOutfitsInventory->onWear(); } @@ -204,10 +202,7 @@ void LLSidepanelAppearance::onEditButtonClicked() void LLSidepanelAppearance::onNewOutfitButtonClicked() { - if (mLookInfo->getVisible()) - { - } - else + if (!mLookInfo->getVisible()) { mPanelOutfitsInventory->onNew(); } @@ -262,12 +257,16 @@ void LLSidepanelAppearance::updateVerbs() bool is_look_info_visible = mLookInfo->getVisible(); mOverflowBtn->setEnabled(false); - if (is_look_info_visible) + if (!is_look_info_visible) { + const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL); + mEditBtn->setEnabled(is_correct_type); + mWearBtn->setEnabled(is_correct_type); } else { - mPanelOutfitsInventory->updateVerbs(); + mEditBtn->setEnabled(FALSE); + mWearBtn->setEnabled(FALSE); } } |