diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2010-04-21 11:24:27 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2010-04-21 11:43:45 (GMT) |
commit | ad0c6b17cde4a3ce0041d1a54b96ccb5a6792520 (patch) | |
tree | 34693630d3a836252715505e536c9c28ec9c64aa /src/gui | |
parent | 48b2025663c93003cd00b807bb74d220c933b78b (diff) | |
download | Qt-ad0c6b17cde4a3ce0041d1a54b96ccb5a6792520.zip Qt-ad0c6b17cde4a3ce0041d1a54b96ccb5a6792520.tar.gz Qt-ad0c6b17cde4a3ce0041d1a54b96ccb5a6792520.tar.bz2 |
Fixes wrong QGraphicsView's viewport cursor reset.
The cursor was reset even when it had not been previously saved.
Autotest included.
Task-number: QTBUG-7438
Reviewed-by: bnilsen
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index a767987..114de85 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -733,11 +733,13 @@ void QGraphicsViewPrivate::_q_unsetViewportCursor() } // Restore the original viewport cursor. - hasStoredOriginalCursor = false; - if (dragMode == QGraphicsView::ScrollHandDrag) - viewport->setCursor(Qt::OpenHandCursor); - else - viewport->setCursor(originalCursor); + if (hasStoredOriginalCursor) { + hasStoredOriginalCursor = false; + if (dragMode == QGraphicsView::ScrollHandDrag) + viewport->setCursor(Qt::OpenHandCursor); + else + viewport->setCursor(originalCursor); + } } #endif |