summaryrefslogtreecommitdiff
path: root/indra/llui/lldockcontrol.cpp
diff options
context:
space:
mode:
authorcallum <none@none>2009-12-28 13:45:57 -0800
committercallum <none@none>2009-12-28 13:45:57 -0800
commit3519435bbfeec4c838d5ffbe008d0ac7bbc085a8 (patch)
tree5d590d84a1fa6c8414adba0732a83a67a440dd37 /indra/llui/lldockcontrol.cpp
parentdd1fb1568e85a8e3622372cae21bcd3205051718 (diff)
parent6008bf61b2d0475a274ad2b851b61e69496b5bf8 (diff)
Merge with (specific revision) and head
Diffstat (limited to 'indra/llui/lldockcontrol.cpp')
-rw-r--r--indra/llui/lldockcontrol.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index 456a2925a3..1c3c8449c5 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -182,6 +182,14 @@ void LLDockControl::moveDockable()
LLRect rootRect;
mGetAllowedRectCallback(rootRect);
+ bool unique_docking = false;
+ LLDockableFloater* dockable_floater =
+ dynamic_cast<LLDockableFloater*> (mDockableFloater);
+ if (dockable_floater != NULL)
+ {
+ unique_docking = dockable_floater->getUniqueDocking();
+ }
+
LLRect dockableRect = mDockableFloater->calcScreenRect();
S32 x = 0;
S32 y = 0;
@@ -208,7 +216,13 @@ void LLDockControl::moveDockable()
case TOP:
x = dockRect.getCenterX() - dockableRect.getWidth() / 2;
- y = dockRect.mTop + mDockTongue->getHeight() + dockableRect.getHeight();
+ y = dockRect.mTop + dockableRect.getHeight();
+ // unique docking used with dock tongue, so add tongue height o the Y coordinate
+ if (unique_docking)
+ {
+ y += mDockTongue->getHeight();
+ }
+
// check is dockable inside root view rect
if (x < rootRect.mLeft)
{
@@ -273,7 +287,15 @@ void LLDockControl::forceRecalculatePosition()
void LLDockControl::drawToungue()
{
- if (mEnabled)
+ bool unique_docking = false;
+ LLDockableFloater* dockable_floater =
+ dynamic_cast<LLDockableFloater*> (mDockableFloater);
+ if (dockable_floater != NULL)
+ {
+ unique_docking = dockable_floater->getUniqueDocking();
+ }
+
+ if (mEnabled && unique_docking)
{
mDockTongue->draw(mDockTongueX, mDockTongueY);
}