From 824f3425f4ee45d1e0c8e579b8f830690af75271 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 27 Jan 2010 16:08:47 +1000 Subject: Ignore mouse events when !interactive. --- src/declarative/graphicsitems/qmlgraphicsflickable.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp index e87f624..42e992a 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflickable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp @@ -780,6 +780,8 @@ void QmlGraphicsFlickable::mousePressEvent(QGraphicsSceneMouseEvent *event) if (d->interactive) { d->handleMousePressEvent(event); event->accept(); + } else { + QmlGraphicsItem::mousePressEvent(event); } } @@ -789,6 +791,8 @@ void QmlGraphicsFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (d->interactive) { d->handleMouseMoveEvent(event); event->accept(); + } else { + QmlGraphicsItem::mouseMoveEvent(event); } } @@ -800,6 +804,8 @@ void QmlGraphicsFlickable::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) d->handleMouseReleaseEvent(event); event->accept(); ungrabMouse(); + } else { + QmlGraphicsItem::mouseReleaseEvent(event); } } @@ -1116,6 +1122,7 @@ bool QmlGraphicsFlickable::yflick() const bool QmlGraphicsFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event) { Q_D(QmlGraphicsFlickable); + qDebug() << " fjdakfl"; QGraphicsSceneMouseEvent mouseEvent(event->type()); QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect(); -- cgit v0.12