From 7105d98e24185f9ce31be1fe1b26c3ae1552e71f Mon Sep 17 00:00:00 2001
From: Paul Guslisty <pguslisty@productengine.com>
Date: Thu, 23 Dec 2010 14:52:57 +0200
Subject: [PATCH] STORM-438 FIXED My inventory floater is not restored if it
 was minimized and 'Open Attachment' button was pressed in the Group Profile.

- Added check whether floater is minimized
---
 indra/newview/llinventorypanel.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 0870b5b8dd3..5a9d1524f34 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -921,6 +921,8 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
 {
 	S32 z_min = S32_MAX;
 	LLInventoryPanel* res = NULL;
+	LLFloater* active_inv_floaterp = NULL;
+
 	// A. If the inventory side panel is open, use that preferably.
 	if (is_inventorysp_active())
 	{
@@ -941,6 +943,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
 		{
 			res = inventorySP->getActivePanel();
 			z_min = gFloaterView->getZOrder(inv_floater);
+			active_inv_floaterp = inv_floater;
 		}
 		else
 		{
@@ -960,10 +963,19 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
 			{
 				res = iv->getPanel();
 				z_min = z_order;
+				active_inv_floaterp = iv;
 			}
 		}
 	}
-	if (res) return res;
+
+	if (res)
+	{
+		// Make sure the floater is not minimized (STORM-438).
+		if (active_inv_floaterp && active_inv_floaterp->isMinimized())
+			active_inv_floaterp->setMinimized(FALSE);
+
+		return res;
+	}
 		
 	// C. If no panels are open and we don't want to force open a panel, then just abort out.
 	if (!auto_open) return NULL;
-- 
GitLab