diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 086e35dfdc473ad8b82c2058ff80427121fb0224..9e989ed052a0500c878031747bb2bc6f61293e7d 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(); }