summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-03-21 14:01:54 -0700
committerRichard Linden <none@none>2012-03-21 14:01:54 -0700
commit71db6d1b91cb8a62959a63ae36d3727e48439245 (patch)
tree6413e0b528caf64daa675ffed1c67f7e17a6e833
parent2fe364dfafe0b68fec4f664312cd943beab1d110 (diff)
CHUI-61 FIX Relative floater positions not written to settings file if previous settings exist from old viewer
-rw-r--r--indra/llui/llfloater.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 1fb10faf1e..f6d4daba4e 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -868,6 +868,7 @@ bool LLFloater::applyRectControl()
}
else
{
+ bool rect_specified = false;
if (!mRectControl.empty())
{
// If we have a saved rect, use it
@@ -881,10 +882,11 @@ bool LLFloater::applyRectControl()
{
reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight()));
}
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
+ rect_specified = true;
}
- mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
- LLRect screen_rect = calcScreenRect();
- mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
}
LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
@@ -903,7 +905,7 @@ bool LLFloater::applyRectControl()
}
// remember updated position
- if (mPositioning == LLFloaterEnums::POSITIONING_RELATIVE)
+ if (rect_specified)
{
storeRectControl();
}