diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-03 10:54:59 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-09-03 10:54:59 (GMT) |
commit | 74e29f6eaec3831ac373270101d8ad8a53fe4471 (patch) | |
tree | 500add6fa7e5724f930801aa64246a89c8ae63f4 /examples | |
parent | 9f85fc8847d178af0e9e9039d80cd017d1c9324b (diff) | |
parent | d3673b331426346167e4dd1cd6c7b78ab7bf5176 (diff) | |
download | Qt-74e29f6eaec3831ac373270101d8ad8a53fe4471.zip Qt-74e29f6eaec3831ac373270101d8ad8a53fe4471.tar.gz Qt-74e29f6eaec3831ac373270101d8ad8a53fe4471.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gestures/imageviewer/imagewidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp index 7dbd084..c71c461 100644 --- a/examples/gestures/imageviewer/imagewidget.cpp +++ b/examples/gestures/imageviewer/imagewidget.cpp @@ -123,8 +123,10 @@ void ImageWidget::panTriggered() void ImageWidget::pinchTriggered() { QPinchGesture *pg = qobject_cast<QPinchGesture*>(sender()); - rotationAngle += pg->rotationAngle(); - scaleFactor += pg->scaleFactor(); + if (pg->whatChanged() & QPinchGesture::RotationAngleChanged) + rotationAngle += pg->rotationAngle() - pg->lastRotationAngle(); + if (pg->whatChanged() & QPinchGesture::ScaleFactorChanged) + scaleFactor += pg->scaleFactor() - pg->lastScaleFactor(); update(); } |