diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-07 20:31:45 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-07 20:31:45 +0200 |
commit | 86c686e962a6fb7e282a0652eaff2b107c48a02d (patch) | |
tree | bc893fbb7a19a910e3716cbb5e6f5abcced489e4 | |
parent | da8de2b6742cad3fadad84c9f0640b69a9690f66 (diff) |
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
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsidetray.h | 5 |
2 files changed, 11 insertions, 3 deletions
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<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) { res = sidepanel_inventory->getActivePanel(); if (res) diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 7321574681..c90b2d7f8c 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -102,6 +102,11 @@ public: LLPanel* getPanel (const std::string& panel_name); /* + * get currently active tab + */ + const LLSideTrayTab* getActiveTab() const { return mActiveTab; } + + /* * collapse SideBar, hiding visible tab and moving tab buttons * to the right corner of the screen */ |