diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-02 12:02:47 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-02 12:02:47 -0500 |
commit | 74f080ed31be1d261852f0f21376e9652e83cdef (patch) | |
tree | 29e4bdd1e94b49e3250f0c8c32a066be1a502c9c /indra/newview | |
parent | 8fdd2e0b28121ead88da55c2be760a5f62b6d112 (diff) |
EXT-3028 : "Find Original" does nothing if floater inventory isn't open
InventorySP will open if no inventory floaters are open.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 0d75561f27..9945bb4404 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -843,18 +843,6 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel() { LLInventoryPanel* res = NULL; - // If the inventorySP is opened and its main inventory view is active, use that. - LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - if (sidepanel_inventory) - { - res = sidepanel_inventory->getActivePanel(); - if (res) - { - return res; - } - } - // Iterate through the inventory floaters and return whichever is on top. LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); S32 z_min = S32_MAX; @@ -871,5 +859,22 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel() } } } + + // Otherwise, open the inventorySP and use that. + if (!res) + { + LLSD key; + LLSidepanelInventory *sidepanel_inventory = + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); + if (sidepanel_inventory) + { + res = sidepanel_inventory->getActivePanel(); + if (res) + { + return res; + } + } + } + return res; } |