From fe9a705709cbd5391ba67bdf3e3b33d2eb95dd29 Mon Sep 17 00:00:00 2001
From: Loren Shih <seraph@lindenlab.com>
Date: Tue, 1 Dec 2009 12:41:13 -0500
Subject: [PATCH] EXT-2922 : 2nd inventroy shouldn't list "New Window" as an
 option, since it silently fails

Fixed the behavior so that New Window brings up a new floater inventory window instead of doing nothing.

--HG--
branch : avatar-pipeline
---
 indra/newview/llfloaterinventory.cpp                     | 6 +++++-
 indra/newview/skins/default/xui/en/floater_inventory.xml | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index db38fc0fb34..4a2e1913cd8 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -107,10 +107,14 @@ LLInventoryPanel* LLFloaterInventory::getPanel()
 // static
 LLFloaterInventory* LLFloaterInventory::showAgentInventory()
 {
+	// Hack to generate semi-unique key for each inventory floater.
+	static S32 instance_num = 0;
+	instance_num = (instance_num + 1) % S32_MAX;
+
 	LLFloaterInventory* iv = NULL;
 	if (!gAgent.cameraMouselook())
 	{
-		iv = LLFloaterReg::showTypedInstance<LLFloaterInventory>("inventory", LLSD());
+		iv = LLFloaterReg::showTypedInstance<LLFloaterInventory>("inventory", LLSD(instance_num));
 	}
 	return iv;
 }
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index dca1692e4a2..ff9f0daee69 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -11,7 +11,7 @@
  help_topic="inventory"
  save_rect="true"
  save_visibility="true"
- single_instance="true"
+ single_instance="false"
  title="INVENTORY"
  width="467">
     <floater.string
-- 
GitLab