From ba1993af7cdf752ea0c25d5f439c6fc279699ed4 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 22 Sep 2011 21:32:59 +0200 Subject: KItemListHeader: Allow resizing and change of the sorting KItemListView does not react on the resizing yet. Toggling the sort order and changing the sort role is already possible. --- src/kitemviews/kitemlistcontroller.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/kitemviews/kitemlistcontroller.cpp') diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index ed23dd1f7..4a81eaaa5 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -362,10 +362,7 @@ bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent* event, const // Check whether a dragging should be started if (event->buttons() & Qt::LeftButton) { const QPointF pos = transform.map(event->pos()); - const qreal minDragDiff = 4; - const bool hasMinDragDiff = qAbs(pos.x() - m_pressedMousePos.x()) >= minDragDiff || - qAbs(pos.y() - m_pressedMousePos.y()) >= minDragDiff; - if (hasMinDragDiff) { + if ((pos - m_pressedMousePos).manhattanLength() >= QApplication::startDragDistance()) { startDragging(); } } -- cgit v1.3