summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-12-07 17:09:19 -0800
committerSteve Bennetts <steve@lindenlab.com>2009-12-07 17:09:19 -0800
commit5c2686bc6323cb162d9b3e4effa6a8d34fb95836 (patch)
tree8162047cfafa9027dbcdc03597f8a0a2ad92c9ee /indra/newview/llinventorypanel.cpp
parentb65334a4c133984fed9466db60df92756e8de05d (diff)
parent5245fb69721bf4b70de85211da6721b0e0137e07 (diff)
Merge
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 54f528de8d..4cbf27b725 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -903,10 +903,13 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
if (!auto_open) return NULL;
// D. Open the inventory side panel and use that.
- LLSD key;
+ LLSideTray *side_tray = LLSideTray::getInstance();
LLSidepanelInventory *sidepanel_inventory =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key));
- if (sidepanel_inventory)
+ dynamic_cast<LLSidepanelInventory *>(side_tray->getPanel("sidepanel_inventory"));
+
+ // Use the inventory side panel only if it is already active.
+ // Activating it may unexpectedly switch off the currently active tab in some cases.
+ if (sidepanel_inventory && (LLPanel*)side_tray->getActiveTab() == (LLPanel*)sidepanel_inventory)
{
return sidepanel_inventory->getActivePanel();
}