From e98a6b0b4592e88217fcdff7df743688ef692818 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 20 Nov 2020 17:38:20 +0200 Subject: SL-14370 Don't build Appearance floater if it's not needed --- indra/newview/llfloatersidepanelcontainer.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatersidepanelcontainer.cpp') diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index 64ddeff1b0..dd7ce40e97 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -60,7 +60,7 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key) void LLFloaterSidePanelContainer::closeFloater(bool app_quitting) { LLPanelOutfitEdit* panel_outfit_edit = - dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); + dynamic_cast(LLFloaterSidePanelContainer::findPanel("appearance", "panel_outfit_edit")); if (panel_outfit_edit) { LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit); @@ -145,3 +145,15 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, return NULL; } + +LLPanel* LLFloaterSidePanelContainer::findPanel(const std::string& floater_name, const std::string& panel_name) +{ + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::findTypedInstance(floater_name); + + if (floaterp) + { + return floaterp->findChild(panel_name, true); + } + + return NULL; +} -- cgit v1.2.3