summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-04-01 15:46:34 -0700
committerRichard Nelson <none@none>2010-04-01 15:46:34 -0700
commit51e1c6b78a36cb968b9b3ea3d37a14dbe2609e8a (patch)
tree8c92a1f3a47c9fe66d1fe7696f4fbd8aea1a52ea /indra/newview/lltooldraganddrop.cpp
parentca8da832bdb1532c47208ea5e1b6ef50a40c3677 (diff)
parent6cc65f9e5f0aba9242295d955eb31c4938b093e1 (diff)
merge
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 394f550f2e..f37efd778f 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -412,9 +412,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,