From a5dfdf0c6f64d40dc8d3d61434427471dbcfc0b2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 18 Jan 2010 20:13:48 +0200 Subject: Refactored fix for (EXT-4156) [BSI] Friendslist doesn't toggle open/close on shortcut - Moved side panel toggling from viewer menu to side tray class. --HG-- branch : product-engine --- indra/newview/llsidetray.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llsidetray.cpp') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index fb8aa39445..50c47e293e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -639,6 +639,21 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para return NULL; } +void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params) +{ + if(!sub_panel) + return; + + if (sub_panel->isInVisibleChain()) + { + LLSideTray::getInstance()->collapseSideBar(); + } + else + { + LLSideTray::getInstance()->showPanel(panel_name, params); + } +} + // This is just LLView::findChildView specialized to restrict the search to LLPanels. // Optimization for EXT-4068 to avoid searching down to the individual item level // when inventories are large. -- cgit v1.2.3