From 7893cc2ed9815f675b760aacc9f3bf38cec9df1a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 16 Mar 2012 17:36:05 -0700 Subject: CHUI-61 FIX Relative floater positions not written to settings file if previous settings exist from old viewer apply relative positioning to floaters that are loaded with rects specified from earlier viewer --- indra/llui/llfloater.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/llui') 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; -- cgit v1.2.3