Fix trying to find the outfit edit panel in non-appearance-panel instances of LLFloaterSidePanelContainer
parent
afed86e579
commit
39d65cc1c4
|
|
@ -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)
|
||||
LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(mMainPanel);
|
||||
if (panel_appearance)
|
||||
{
|
||||
edit_wearable_ptr->onClose();
|
||||
}
|
||||
if (!app_quitting)
|
||||
{
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue