diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-27 03:38:53 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-27 03:38:53 (GMT) |
commit | 1a862af842db0196313ab7819b607763fd0d87db (patch) | |
tree | 3e5f256b64a88b520d5b749032135fc2f69238c0 /src | |
parent | 76ece6b01e88199349e4c98897b5a846e8253c9d (diff) | |
parent | b214f0da048a71cd7da410c32c111d3b92cbca47 (diff) | |
download | Qt-1a862af842db0196313ab7819b607763fd0d87db.zip Qt-1a862af842db0196313ab7819b607763fd0d87db.tar.gz Qt-1a862af842db0196313ab7819b607763fd0d87db.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/fx/qfxflickable.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index a83ee66..cbfe9f6 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -618,11 +618,18 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) newY = minY + (newY - minY) / 2; if (newY < maxY && maxY - minY < 0) newY = maxY + (newY - maxY) / 2; - if (q->overShoot() || (newY <= minY && newY >= maxY)) { + if (!q->overShoot() && (newY > minY || newY < maxY)) { + if (newY > minY) + newY = minY; + else if (newY < maxY) + newY = maxY; + else + rejectY = true; + } + if (!rejectY) { _moveY.setValue(newY); moved = true; - } else if (!q->overShoot()) - rejectY = true; + } if (qAbs(dy) > DragThreshold) stealMouse = true; } @@ -638,11 +645,19 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) newX = minX + (newX - minX) / 2; if (newX < maxX && maxX - minX < 0) newX = maxX + (newX - maxX) / 2; - if (q->overShoot() || (newX <= minX && newX >= maxX)) { + if (!q->overShoot() && (newX > minX || newX < maxX)) { + if (newX > minX) + newX = minX; + else if (newX < maxX) + newX = maxX; + else + rejectX = true; + } + if (!rejectX) { _moveX.setValue(newX); moved = true; - } else if (!q->overShoot()) - rejectX = true; + } + if (qAbs(dx) > DragThreshold) stealMouse = true; } |