From 86c686e962a6fb7e282a0652eaff2b107c48a02d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 7 Dec 2009 20:31:45 +0200 Subject: Fix for major bug EXT-3135 "Crash after dragging LM from 'Inventory' accordion to fav bar". - Added method to get currently active tab in sidetray. - Disabled opening sidetray inventory panel upon receiving new inventory item or after drag-n-drop operations with landmarks in sidetray places panel. --HG-- branch : product-engine --- indra/newview/llinventorypanel.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index baa659df7c..b89a8bfd7d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -881,10 +881,13 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel() // Otherwise, open the inventorySP and use that. if (!res) { - LLSD key; + LLSideTray *side_tray = LLSideTray::getInstance(); LLSidepanelInventory *sidepanel_inventory = - dynamic_cast(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); - if (sidepanel_inventory) + dynamic_cast(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) { res = sidepanel_inventory->getActivePanel(); if (res) -- cgit v1.2.3