summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelappearance.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-29 23:36:55 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-29 23:36:55 +0300
commit309fb9e892beb724a442c85bcfd07d6f3f7c9c07 (patch)
treec666ffb7202a74f84cbdd85364f5edbd6c78df82 /indra/newview/llsidepanelappearance.cpp
parent569ad2d248cd1297b937e2c003399937114d06b9 (diff)
SL-15034 Revisions to dedicated Avatar menus
Diffstat (limited to 'indra/newview/llsidepanelappearance.cpp')
-rw-r--r--indra/newview/llsidepanelappearance.cpp60
1 files changed, 38 insertions, 22 deletions
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 48151c17ea..6dfe40c29a 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -164,8 +164,12 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
std::string type = key["type"].asString();
if (type == "my_outfits")
{
- showOutfitsInventoryPanel();
+ showOutfitsInventoryPanel("outfitslist_tab");
}
+ else if (type == "now_wearing")
+ {
+ showOutfitsInventoryPanel("cof_tab");
+ }
else if (type == "edit_outfit")
{
showOutfitEditPanel();
@@ -287,7 +291,14 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel()
{
toggleWearableEditPanel(FALSE);
toggleOutfitEditPanel(FALSE);
- toggleMyOutfitsPanel(TRUE);
+ toggleMyOutfitsPanel(TRUE, "");
+}
+
+void LLSidepanelAppearance::showOutfitsInventoryPanel(const std::string &tab_name)
+{
+ toggleWearableEditPanel(FALSE);
+ toggleOutfitEditPanel(FALSE);
+ toggleMyOutfitsPanel(TRUE, tab_name);
}
void LLSidepanelAppearance::showOutfitEditPanel()
@@ -312,37 +323,42 @@ void LLSidepanelAppearance::showOutfitEditPanel()
return;
}
- toggleMyOutfitsPanel(FALSE);
+ toggleMyOutfitsPanel(FALSE, "");
toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
toggleOutfitEditPanel(TRUE);
}
void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, BOOL disable_camera_switch)
{
- toggleMyOutfitsPanel(FALSE);
+ toggleMyOutfitsPanel(FALSE, "");
toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode
toggleWearableEditPanel(TRUE, wearable, disable_camera_switch);
}
-void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible)
+void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name)
{
- if (!mPanelOutfitsInventory || mPanelOutfitsInventory->getVisible() == visible)
- {
- // visibility isn't changing, hence nothing to do
- return;
- }
-
- mPanelOutfitsInventory->setVisible(visible);
-
- // *TODO: Move these controls to panel_outfits_inventory.xml
- // so that we don't need to toggle them explicitly.
- mFilterEditor->setVisible(visible);
- mCurrOutfitPanel->setVisible(visible);
-
- if (visible)
- {
- mPanelOutfitsInventory->onOpen(LLSD());
- }
+ if (!mPanelOutfitsInventory
+ || (mPanelOutfitsInventory->getVisible() == visible && tab_name.empty()))
+ {
+ // visibility isn't changing, hence nothing to do
+ return;
+ }
+
+ mPanelOutfitsInventory->setVisible(visible);
+
+ // *TODO: Move these controls to panel_outfits_inventory.xml
+ // so that we don't need to toggle them explicitly.
+ mFilterEditor->setVisible(visible);
+ mCurrOutfitPanel->setVisible(visible);
+
+ if (visible)
+ {
+ mPanelOutfitsInventory->onOpen(LLSD());
+ if (!tab_name.empty())
+ {
+ mPanelOutfitsInventory->openApearanceTab(tab_name);
+ }
+ }
}
void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)