From 3810a391d018f480487e8012654b9b75d3525ced Mon Sep 17 00:00:00 2001
From: Paul ProductEngine <pguslisty@productengine.com>
Date: Sat, 26 Feb 2011 17:26:34 +0200
Subject: [PATCH] STORM-494 FIXED Message Well window is undocked while opening
 Side bar

- To calculate properly whether the dockable floater visible or not, it's needed to get root view as dockable floater's parent
---
 indra/llui/lldockcontrol.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index f6f5a0beb38..5ed2c27160e 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -160,8 +160,10 @@ bool LLDockControl::isDockVisible()
 			case TOP:
 			{
 				// check is dock inside parent rect
+				// assume that parent for all dockable flaoters
+				// is the root view
 				LLRect dockParentRect =
-						mDockWidget->getParent()->calcScreenRect();
+						mDockWidget->getRootView()->calcScreenRect();
 				if (dockRect.mRight <= dockParentRect.mLeft
 						|| dockRect.mLeft >= dockParentRect.mRight)
 				{
-- 
GitLab