summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-08-23 15:47:40 -0700
committerRichard Linden <none@none>2012-08-23 15:47:40 -0700
commit141dbef088187368268f9eeddbc107802c14e085 (patch)
tree2e3233c7d62d38bcbf19ef99138202eba6a2e66c /indra/llui/llfloater.cpp
parent67750daf2318f5b91694fc8beb78f7b89880a6d1 (diff)
MAINT-1473 FIXED Resizing floater past edge of screen causes opposite side of floater to move
updated resize logic to reset floater extents when resizing past bounds
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index ad64a9a5e5..dea746db60 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1101,21 +1101,26 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
const LLRect old_rect = getRect();
LLView::handleReshape(new_rect, by_user);
- if (by_user && !isMinimized())
+ if (by_user && !getHost())
{
- if (isDocked())
- {
- setDocked( false, false);
- }
- storeRectControl();
- mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
- LLRect screen_rect = calcScreenRect();
- mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
+ static_cast<LLFloaterView*>(getParent())->adjustToFitScreen(this, !isMinimized());
}
// if not minimized, adjust all snapped dependents to new shape
if (!isMinimized())
{
+ if (by_user)
+ {
+ if (isDocked())
+ {
+ setDocked( false, false);
+ }
+ storeRectControl();
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ LLRect screen_rect = calcScreenRect();
+ mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
+ }
+
// gather all snapped dependents
for(handle_set_iter_t dependent_it = mDependents.begin();
dependent_it != mDependents.end(); ++dependent_it)