summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index dd6b034dc8..02ef1e4e50 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5651,15 +5651,18 @@ class LLShowSidetrayPanel : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string panel_name = userdata.asString();
- // Toggle the panel
- if (!LLSideTray::getInstance()->isPanelActive(panel_name))
- {
- // LLFloaterInventory::showAgentInventory();
- LLSideTray::getInstance()->showPanel(panel_name, LLSD());
- }
- else
+
+ LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name);
+ if (panel)
{
- LLSideTray::getInstance()->collapseSideBar();
+ if (panel->isInVisibleChain())
+ {
+ LLSideTray::getInstance()->hidePanel(panel_name);
+ }
+ else
+ {
+ LLSideTray::getInstance()->showPanel(panel_name);
+ }
}
return true;
}