diff options
| author | Peter Penz <[email protected]> | 2011-09-22 21:32:59 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-09-22 21:35:14 +0200 |
| commit | ba1993af7cdf752ea0c25d5f439c6fc279699ed4 (patch) | |
| tree | 46dbda6042699a33d3448b005ed51bcff51a5921 /src/kitemviews/kitemlistcontroller.cpp | |
| parent | f3c370de1981235aa843c35d03cead942a0cb58c (diff) | |
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.
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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(); } } |
