summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-02 09:51:12 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-02 09:51:12 +0100
commit9c715190ef9497212834452dbfd3c28856e7b044 (patch)
treeb9e479e36ce72ce80bc026749ae5f8328e520004 /indra/newview/lltooldraganddrop.cpp
parentb1ae22c3eb71767219ebb96ec80011e10bbfabbe (diff)
parent18d9efff12ef8b59c648a801fe2c5c7e0bc8fde4 (diff)
merge from viewer-trunk
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 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,