summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llsidetray.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 086e35dfdc..9e989ed052 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -1015,7 +1015,9 @@ void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name,
if(!sub_panel)
return;
- if (sub_panel->isInVisibleChain())
+ // If a panel is visible and attached to Side Tray (has LLSideTray among its ancestors)
+ // it should be toggled off by collapsing Side Tray.
+ if (sub_panel->isInVisibleChain() && sub_panel->hasAncestor(this))
{
LLSideTray::getInstance()->collapseSideBar();
}