From 2d6caf67f8e2a49c5c5516e6837ed6b2862130c2 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Mon, 20 Jul 2009 11:35:44 +0200 Subject: Fix the hand scrolling in QGraphicsView that will stop unexpectedly. If you start a hand scrolling and during moving, you press another button of the mouse than the left one, the scrolling suddently stop working. In mouseReleaseEvent we just stop the hand scrolling if the button is left. Task:258356 Reviewed-by:janarve --- src/gui/graphicsview/qgraphicsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index a3fe307..b888b01 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -3342,7 +3342,7 @@ void QGraphicsView::mouseReleaseEvent(QMouseEvent *event) } } else #endif - if (d->dragMode == QGraphicsView::ScrollHandDrag) { + if (d->dragMode == QGraphicsView::ScrollHandDrag && event->button() == Qt::LeftButton) { #ifndef QT_NO_CURSOR // Restore the open hand cursor. ### There might be items // under the mouse that have a valid cursor at this time, so -- cgit v0.12