From d99d5fbea76a79346761c0d8ce98a0719e5790d2 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 27 Aug 2011 20:12:03 +0200 Subject: Improve the autoscrolling for the rubberband selection This modifications will also allow to do an autoscrolling in an easy way for drag and drop operations (not fully implemented yet). --- src/kitemviews/kitemlistcontroller.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kitemviews/kitemlistcontroller.cpp') diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index ddae06c17..78c0a3594 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -306,6 +306,7 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const rubberBand->setEndPosition(startPos); rubberBand->setActive(true); connect(rubberBand, SIGNAL(endPositionChanged(QPointF,QPointF)), this, SLOT(slotRubberBandChanged())); + m_view->setAutoScroll(true); } return false; @@ -365,6 +366,7 @@ bool KItemListController::mouseReleaseEvent(QGraphicsSceneMouseEvent* event, con disconnect(rubberBand, SIGNAL(endPositionChanged(QPointF,QPointF)), this, SLOT(slotRubberBandChanged())); rubberBand->setActive(false); m_oldSelection.clear(); + m_view->setAutoScroll(false); if (rubberBand->startPosition() != rubberBand->endPosition()) { clearSelection = false; -- cgit v1.3