summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp15
1 files changed, 15 insertions, 0 deletions
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.