summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-02-02 06:06:36 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2011-02-02 06:14:25 (GMT)
commitac5e89a2fd94c4eb45e79e2c19b3ef5e9b240cb9 (patch)
tree75f62aa41f7c56416d38b02222eccad0bbf6584d /src
parent7836b89fbbb29ee16df863aea460c1c34d4321c9 (diff)
downloadQt-ac5e89a2fd94c4eb45e79e2c19b3ef5e9b240cb9.zip
Qt-ac5e89a2fd94c4eb45e79e2c19b3ef5e9b240cb9.tar.gz
Qt-ac5e89a2fd94c4eb45e79e2c19b3ef5e9b240cb9.tar.bz2
Make Flickable's wheel handling more like QAbstractScrollArea.
Vertical scrolling should only affect vertical movement, and horizontal scrolling should only affect horizontal movement. Task-number: QTBUG-7369 Reviewed-by: Martin Jones
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index ba5e12c..87578b4 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -876,7 +876,7 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
Q_D(QDeclarativeFlickable);
if (!d->interactive) {
QDeclarativeItem::wheelEvent(event);
- } else if (yflick()) {
+ } else if (yflick() && event->orientation() == Qt::Vertical) {
if (event->delta() > 0)
d->vData.velocity = qMax(event->delta() - d->vData.smoothVelocity.value(), qreal(250.0));
else
@@ -888,7 +888,7 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
movementStarting();
}
event->accept();
- } else if (xflick()) {
+ } else if (xflick() && event->orientation() == Qt::Horizontal) {
if (event->delta() > 0)
d->hData.velocity = qMax(event->delta() - d->hData.smoothVelocity.value(), qreal(250.0));
else