summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-07-20 09:35:44 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-07-20 09:42:36 (GMT)
commit2d6caf67f8e2a49c5c5516e6837ed6b2862130c2 (patch)
treed659f07f4e9fd8cb8ad21ff67db2acad889b1d19 /src/gui/graphicsview/qgraphicsview.cpp
parent84abdaa41e6c3bde6ac653e02bd72300b6681572 (diff)
downloadQt-2d6caf67f8e2a49c5c5516e6837ed6b2862130c2.zip
Qt-2d6caf67f8e2a49c5c5516e6837ed6b2862130c2.tar.gz
Qt-2d6caf67f8e2a49c5c5516e6837ed6b2862130c2.tar.bz2
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
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp2
1 files changed, 1 insertions, 1 deletions
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