summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lldockcontrol.cpp10
-rw-r--r--indra/llui/lldockcontrol.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index bec7f04cc0..e119d387ce 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -65,11 +65,14 @@ void LLDockControl::repositionDockable()
void LLDockControl::calculateDockablePosition()
{
LLRect dockRect = mDockWidget->calcScreenRect();
- if (mPrevDockRect != dockRect || mRecalculateDocablePosition)
+ LLRect rootRect = mDockableFloater->getRootView()->getRect();
+
+ // recalculate dockable position if dock position changed
+ // or root view rect changed or recalculation is forced
+ if (mPrevDockRect != dockRect || mRootRect != rootRect
+ || mRecalculateDocablePosition)
{
LLRect dockableRect = mDockableFloater->calcScreenRect();
- LLRect rootRect = mDockableFloater->getRootView()->getRect();
-
S32 x = 0;
S32 y = 0;
switch (mDockAt)
@@ -100,6 +103,7 @@ void LLDockControl::calculateDockablePosition()
mDockableFloater->screenPointToLocal(mDockTongueX, mDockTongueY,
&mDockTongueX, &mDockTongueY);
mPrevDockRect = dockRect;
+ mRootRect = rootRect;
mRecalculateDocablePosition = false;
}
}
diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h
index 0e1f4c8e64..ae4e53ddc9 100644
--- a/indra/llui/lldockcontrol.h
+++ b/indra/llui/lldockcontrol.h
@@ -72,6 +72,7 @@ private:
DocAt mDockAt;
LLView* mDockWidget;
LLRect mPrevDockRect;
+ LLRect mRootRect;
LLFloater* mDockableFloater;
LLUIImagePtr mDockTongue;
S32 mDockTongueX;