From 756ab4cad5908f30c29a9e86f6905745dbec616c Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Thu, 21 Feb 2013 16:50:11 -0800
Subject: [PATCH] SH-3864 FIX Closing the Inventory window exits outfit
 editing. cleaned up logic when closing floatersidepanels

---
 indra/newview/llfloatersidepanelcontainer.cpp | 24 +++++++------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 02150819a00..ce5ea664717 100755
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -59,30 +59,22 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& 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())
+	if (panel_outfit_edit)
 	{
 		LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
-		if (parent == this)
+		if (parent == this )
 		{
-			LLSidepanelAppearance* panel_appearance =
-				dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
-			panel_appearance->showOutfitsInventoryPanel();
+			LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
+			if ( panel_appearance )
+			{
+				panel_appearance->getWearable()->onClose();
+				panel_appearance->showOutfitsInventoryPanel();
+			}
 		}
 	}
 	
-	if ( panel_outfit_edit )
-	{
-		LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
-		if ( panel_appearance )
-		{
-			panel_appearance->getWearable()->onClose();
-			panel_appearance->showOutfitsInventoryPanel();
-		}
-	}
 	LLFloater::onClickCloseBtn();
 }
 
-- 
GitLab