summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp9
-rw-r--r--indra/llui/llfloaterreg.cpp4
2 files changed, 6 insertions, 7 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index b091a4a1f7..9c4bf0a5c2 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -882,6 +882,10 @@ 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();
+ storeRectControl();
}
LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl);
@@ -898,11 +902,6 @@ bool LLFloater::applyRectControl()
saved_rect = true;
}
- else
- {
- LLRect screen_rect = calcScreenRect();
- mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
- }
}
return saved_rect;
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 3d124cf885..9115eb7174 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -375,7 +375,7 @@ std::string LLFloaterReg::declareRectControl(const std::string& name)
std::string LLFloaterReg::declarePosXControl(const std::string& name)
{
- std::string controlname = std::string("floater_pos_x_") + getBaseControlName(name);
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_x";
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window X Position for %s", name.c_str()),
@@ -385,7 +385,7 @@ std::string LLFloaterReg::declarePosXControl(const std::string& name)
std::string LLFloaterReg::declarePosYControl(const std::string& name)
{
- std::string controlname = std::string("floater_pos_y_") + getBaseControlName(name);
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_y";
LLFloater::getControlGroup()->declareF32(controlname,
10.f,
llformat("Window Y Position for %s", name.c_str()),