summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-11-15 16:40:31 -0800
committerRichard Linden <none@none>2011-11-15 16:40:31 -0800
commit30beda590a93aca9b2a27edb9be94665290c2e7c (patch)
treec678c686333e796af62d90e1223dd0077a9c6a0e /indra
parenta787e1bb7aad25f9488de7d93298b58820c948d5 (diff)
EXP-1588 FIX Floaters do not snap to edge
made non-movable floaters not use auto-follow logic toasts will now use own layout logic
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfloater.cpp14
-rw-r--r--indra/llui/llfloater.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index c5d7d1db56..a5fd3ea552 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1951,6 +1951,12 @@ void LLFloater::setCanDrag(BOOL can_drag)
}
}
+bool LLFloater::getCanDrag()
+{
+ return mDragHandle->getEnabled();
+}
+
+
void LLFloater::updateTitleButtons()
{
static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
@@ -2181,7 +2187,7 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
LLFloater* floaterp = (LLFloater*)viewp;
if (floaterp->isDependent())
{
- // dependents use same follow flags as their "dependee"
+ // dependents are moved with their "dependee"
continue;
}
@@ -2209,7 +2215,11 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
translate_y = new_top - old_top;
}
- floaterp->translate(translate_x, translate_y);
+ // don't reposition immovable floaters
+ if (floaterp->getCanDrag())
+ {
+ floaterp->translate(translate_x, translate_y);
+ }
BOOST_FOREACH(LLHandle<LLFloater> dependent_floater, floaterp->mDependents)
{
if (dependent_floater.get())
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 4e8c539144..8886ae3393 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -234,6 +234,7 @@ public:
void setCanTearOff(BOOL can_tear_off);
virtual void setCanResize(BOOL can_resize);
void setCanDrag(BOOL can_drag);
+ bool getCanDrag();
void setHost(LLMultiFloater* host);
BOOL isResizable() const { return mResizable; }
void setResizeLimits( S32 min_width, S32 min_height );