aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/lldraghandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/lldraghandle.cpp')
-rw-r--r--linden/indra/llui/lldraghandle.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp
index a3d28ad..3497f0d 100644
--- a/linden/indra/llui/lldraghandle.cpp
+++ b/linden/indra/llui/lldraghandle.cpp
@@ -328,7 +328,12 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
328 // Resize the parent 328 // Resize the parent
329 S32 delta_x = screen_x - mDragLastScreenX; 329 S32 delta_x = screen_x - mDragLastScreenX;
330 S32 delta_y = screen_y - mDragLastScreenY; 330 S32 delta_y = screen_y - mDragLastScreenY;
331 getParent()->translate(delta_x, delta_y); 331
332 LLRect original_rect = getParent()->getRect();
333 LLRect translated_rect = getParent()->getRect();
334 translated_rect.translate(delta_x, delta_y);
335 // temporarily slam dragged window to new position
336 getParent()->setRect(translated_rect);
332 S32 pre_snap_x = getParent()->getRect().mLeft; 337 S32 pre_snap_x = getParent()->getRect().mLeft;
333 S32 pre_snap_y = getParent()->getRect().mBottom; 338 S32 pre_snap_y = getParent()->getRect().mBottom;
334 mDragLastScreenX = screen_x; 339 mDragLastScreenX = screen_x;
@@ -348,7 +353,12 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
348 getParent()->snappedTo(snap_view); 353 getParent()->snappedTo(snap_view);
349 delta_x = new_rect.mLeft - pre_snap_x; 354 delta_x = new_rect.mLeft - pre_snap_x;
350 delta_y = new_rect.mBottom - pre_snap_y; 355 delta_y = new_rect.mBottom - pre_snap_y;
351 getParent()->translate(delta_x, delta_y); 356 translated_rect.translate(delta_x, delta_y);
357
358 // restore original rect so delta are detected, then call user reshape method to handle snapped floaters, etc
359 getParent()->setRect(original_rect);
360 getParent()->userSetShape(translated_rect);
361
352 mDragLastScreenX += delta_x; 362 mDragLastScreenX += delta_x;
353 mDragLastScreenY += delta_y; 363 mDragLastScreenY += delta_y;
354 364