From 9e1b5bcd2cf40e9efe381f7fea7d855924b0f11c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Aug 2012 18:20:29 -0400 Subject: SH-3312 FIX - closing floater with outfit edit now has same behavior as explicitly leaving outfit edit with backarrow --- indra/newview/llfloatersidepanelcontainer.cpp | 22 ++++++++++++++++++++++ indra/newview/llfloatersidepanelcontainer.h | 2 ++ 2 files changed, 24 insertions(+) mode change 100644 => 100755 indra/newview/llfloatersidepanelcontainer.cpp mode change 100644 => 100755 indra/newview/llfloatersidepanelcontainer.h (limited to 'indra/newview') diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp old mode 100644 new mode 100755 index 5385977d95..3c966a073f --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -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(sMainPanelName)->onOpen(key); } +void LLFloaterSidePanelContainer::onClickCloseBtn() +{ + llinfos << "close clicked" << llendl; + + LLPanelOutfitEdit* panel_outfit_edit = + dynamic_cast(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(getPanel("appearance")); + panel_appearance->showOutfitsInventoryPanel(); + } + } + + LLFloater::onClickCloseBtn(); +} + LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params) { LLView* view = findChildView(panel_name, true); diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h old mode 100644 new mode 100755 index 10d85867ce..491723471f --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -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); -- cgit v1.2.3