diff options
author | Jacek Antonelli | 2008-08-15 23:44:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:57 -0500 |
commit | da68d3a57ecb27eba5d7efb8ff77d9640c0be65e (patch) | |
tree | f2fa2b9ed6e8cf49c8a3cb2a1893c4e5c61916a1 /linden/indra/llui/lldraghandle.cpp | |
parent | Second Life viewer sources 1.15.1.3 (diff) | |
download | meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.zip meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.gz meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.bz2 meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.xz |
Second Life viewer sources 1.16.0.5
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lldraghandle.cpp | 14 |
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 | ||