summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Krems <m.krems@software-vision.eu>2013-08-31 16:42:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-06 23:21:18 +0200
commit730bc064a070e886e10950ccfd59780e8976f5fd (patch)
tree9d450ac04ea1d5e07a8f83f89a0d0f7002114fa6 /src
parentba43b70132b661d1b8d99af5258fca3567fe776c (diff)
Forward QGraphicsView::mouseDoubleClickEvent
Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 846858ab31..a39c084798 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -3221,6 +3221,13 @@ void QGraphicsView::mouseDoubleClickEvent(QMouseEvent *event)
qt_sendSpontaneousEvent(d->scene, &mouseEvent);
else
QApplication::sendEvent(d->scene, &mouseEvent);
+
+ // Update the original mouse event accepted state.
+ const bool isAccepted = mouseEvent.isAccepted();
+ event->setAccepted(isAccepted);
+
+ // Update the last mouse event accepted state.
+ d->lastMouseEvent.setAccepted(isAccepted);
}
/*!