diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-05-05 13:33:42 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-05-05 14:40:05 (GMT) |
commit | 2137f41ca0df3c83abce9dd386074e0fd09a33dc (patch) | |
tree | d1d187cdbe2c26ab523318218781c949f081e33a /src | |
parent | a5c9793ea6b5590f1033546856c34eaee6352d58 (diff) | |
download | Qt-2137f41ca0df3c83abce9dd386074e0fd09a33dc.zip Qt-2137f41ca0df3c83abce9dd386074e0fd09a33dc.tar.gz Qt-2137f41ca0df3c83abce9dd386074e0fd09a33dc.tar.bz2 |
Partially revert 37c72476fc444d3089075473cb4e9aa42ed64694
The problem was that mouse move events were not forwarded to the scene
when mouse tracking was explicitly enabled on the view.
Mouse tracking is disabled by default unless the scene contains
an item that accepts hover events or has a cursor set.
A mouse move event can only occur if:
1) a mouse button is pressed while moving the mouse
2) mouse tracking is enabled
That means the part I've reverted was only hitting when
mouse tracking was explicitly enabled, which is wrong.
We always have to forward mouse move events to the scene if
the view is getting them in the first place.
Auto test included.
Reviewed-by: Andreas
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 7720a10..644e843 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -587,10 +587,6 @@ void QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent *event) return; if (!scene) return; - if (scene->d_func()->allItemsIgnoreHoverEvents && scene->d_func()->allItemsUseDefaultCursor - && !event->buttons()) { // forward event to the scene if something is pressed. - return; // No need to process this event further. - } QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMouseMove); mouseEvent.setWidget(q->viewport()); |