summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfloater.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index f49b4edb98..d058b4ae44 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -884,22 +884,24 @@ bool LLFloater::applyRectControl()
}
}
- if (!mPosXControl.empty() && !mPosYControl.empty())
- {
- LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
- LLControlVariablePtr y_control = getControlGroup()->getControl(mPosYControl);
- if (x_control.notNull()
- && y_control.notNull()
- && !x_control->isDefault()
- && !y_control->isDefault())
- {
- mPosition.mX = x_control->getValue().asReal();
- mPosition.mY = y_control->getValue().asReal();
- mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
- applyRelativePosition();
+ LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
+ LLControlVariablePtr y_control = getControlGroup()->getControl(mPosYControl);
+ if (x_control.notNull()
+ && y_control.notNull()
+ && !x_control->isDefault()
+ && !y_control->isDefault())
+ {
+ mPosition.mX = x_control->getValue().asReal();
+ mPosition.mY = y_control->getValue().asReal();
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ applyRelativePosition();
- saved_rect = true;
- }
+ saved_rect = true;
+ }
+ else
+ {
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
}
}
@@ -929,7 +931,6 @@ void LLFloater::applyPositioning(LLFloater* other, bool on_open)
break;
case LLFloaterEnums::POSITIONING_SPECIFIED:
- //translateIntoRect(gFloaterView->getSnapRect());
break;
case LLFloaterEnums::POSITIONING_CASCADE_GROUP:
@@ -955,7 +956,6 @@ void LLFloater::applyPositioning(LLFloater* other, bool on_open)
translate(snap_rect.mLeft, snap_rect.mBottom);
}
- //mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;
setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);
}
break;