summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-18 16:16:37 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-08-18 18:36:33 -0400
commit39d65cc1c44496889e4d41956e6576012aba6624 (patch)
tree7647b920a2f631d5dc9f8c6769b812ea82d0d311 /indra
parentafed86e57977c9162972c7ea9daf67cbb3ca2318 (diff)
Fix trying to find the outfit edit panel in non-appearance-panel instances of LLFloaterSidePanelContainer
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 9e577c83a8..7bc95c2884 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -66,24 +66,26 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
{
- LLPanelOutfitEdit* panel_outfit_edit =
- dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
- if (panel_outfit_edit)
+ if(getInstanceName() == "appearance")
{
- LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
- if (parent == this )
+ LLPanelOutfitEdit* panel_outfit_edit = findChild<LLPanelOutfitEdit>("panel_outfit_edit");
+ if (panel_outfit_edit)
{
- LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
- if (panel_appearance)
+ LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
+ if (parent == this)
{
- LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
- if (edit_wearable_ptr)
- {
- edit_wearable_ptr->onClose();
- }
- if (!app_quitting)
+ LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(mMainPanel);
+ if (panel_appearance)
{
- panel_appearance->showOutfitsInventoryPanel();
+ LLPanelEditWearable *edit_wearable_ptr = panel_appearance->getWearable();
+ if (edit_wearable_ptr)
+ {
+ edit_wearable_ptr->onClose();
+ }
+ if(!app_quitting)
+ {
+ panel_appearance->showOutfitsInventoryPanel();
+ }
}
}
}
@@ -99,10 +101,9 @@ void LLFloaterSidePanelContainer::closeFloater(bool app_quitting)
void LLFloaterSidePanelContainer::onClickCloseBtn(bool app_quitting)
{
- if (!app_quitting)
+ if (!app_quitting && getInstanceName() == "appearance")
{
- LLPanelOutfitEdit* panel_outfit_edit =
- dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit"));
+ LLPanelOutfitEdit* panel_outfit_edit = findChild<LLPanelOutfitEdit>("panel_outfit_edit");
if (panel_outfit_edit)
{
LLFloater* parent = gFloaterView->getParentFloater(panel_outfit_edit);