ListView: Fix off-by-1 bug introduced in hrev50574

7687a6ef13

jgt^He

Fixes #12990 more better

Thanks Humdinger for noticing this bug and reporting it.
This commit is contained in:
John Scipione
2016-10-26 13:36:49 -07:00
parent 000b15f2c3
commit 134ed61451
+1 -1
View File
@@ -1958,7 +1958,7 @@ BListView::_DoneTracking(BPoint where)
void
BListView::_Track(BPoint where, uint32)
{
if (fTrack->item_index > 0 && fTrack->try_drag) {
if (fTrack->item_index >= 0 && fTrack->try_drag) {
// initiate a drag if the mouse was moved far enough
BPoint offset = where - fTrack->drag_start;
float dragDistance = sqrtf(offset.x * offset.x + offset.y * offset.y);