diff options
author | Morten Sorvig <msorvig@trolltech.com> | 2009-09-03 10:19:11 (GMT) |
---|---|---|
committer | Morten Sorvig <msorvig@trolltech.com> | 2009-09-03 10:19:11 (GMT) |
commit | 75078d7b20155ba192b88ec54008e07d1ee44676 (patch) | |
tree | e170f474aaed28d2476dc2d134f3be27e76c3741 /examples | |
parent | 0dcf114697309f3f23f9717b608fa2be1813fe94 (diff) | |
parent | f55a2e6b2b3d97e74c3368552a6fba412d86e0b9 (diff) | |
download | Qt-75078d7b20155ba192b88ec54008e07d1ee44676.zip Qt-75078d7b20155ba192b88ec54008e07d1ee44676.tar.gz Qt-75078d7b20155ba192b88ec54008e07d1ee44676.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.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(); } |