SH-3312 FIX - closing floater with outfit edit now has same behavior as explicitly leaving outfit edit with backarrow

meow-7.2.2
Brad Payne (Vir Linden) 2012-08-29 18:20:29 -04:00
parent a6bdef6480
commit 9e1b5bcd2c
2 changed files with 24 additions and 0 deletions

22
indra/newview/llfloatersidepanelcontainer.cpp Normal file → Executable file
View File

@ -32,6 +32,8 @@
// newview includes
#include "llsidetraypanelcontainer.h"
#include "lltransientfloatermgr.h"
#include "llpaneloutfitedit.h"
#include "llsidepanelappearance.h"
//static
const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
@ -54,6 +56,26 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
getChild<LLPanel>(sMainPanelName)->onOpen(key);
}
void LLFloaterSidePanelContainer::onClickCloseBtn()
{
llinfos << "close clicked" << llendl;
LLPanelOutfitEdit* panel_outfit_edit =
dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
if (panel_outfit_edit && panel_outfit_edit->getVisible())
{
LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
if (parent == this)
{
LLSidepanelAppearance* panel_appearance =
dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
panel_appearance->showOutfitsInventoryPanel();
}
}
LLFloater::onClickCloseBtn();
}
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
{
LLView* view = findChildView(panel_name, true);

2
indra/newview/llfloatersidepanelcontainer.h Normal file → Executable file
View File

@ -51,6 +51,8 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClickCloseBtn();
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
static void showPanel(const std::string& floater_name, const LLSD& key);