diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-02 09:51:12 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-02 09:51:12 +0100 |
commit | 9c715190ef9497212834452dbfd3c28856e7b044 (patch) | |
tree | b9e479e36ce72ce80bc026749ae5f8328e520004 /indra/newview/lltooldraganddrop.cpp | |
parent | b1ae22c3eb71767219ebb96ec80011e10bbfabbe (diff) | |
parent | 18d9efff12ef8b59c648a801fe2c5c7e0bc8fde4 (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 84b2caeddd..71d5a26398 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -413,9 +413,12 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { - const S32 MIN_MANHATTAN_DIST = 3; - S32 manhattan_dist = llabs( x - mDragStartX ) + llabs( y - mDragStartY ); - return manhattan_dist >= MIN_MANHATTAN_DIST; + static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold"); + + S32 mouse_delta_x = x - mDragStartX; + S32 mouse_delta_y = y - mDragStartY; + + return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > drag_and_drop_threshold * drag_and_drop_threshold; } void LLToolDragAndDrop::beginDrag(EDragAndDropType type, |