summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/gestures/imageviewer/imagewidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.cpp b/examples/gestures/imageviewer/imagewidget.cpp
index a4ea238..c71c461 100644
--- a/examples/gestures/imageviewer/imagewidget.cpp
+++ b/examples/gestures/imageviewer/imagewidget.cpp
@@ -123,9 +123,9 @@ void ImageWidget::panTriggered()
void ImageWidget::pinchTriggered()
{
QPinchGesture *pg = qobject_cast<QPinchGesture*>(sender());
- if (pg->rotationAngle() != 0.0)
+ if (pg->whatChanged() & QPinchGesture::RotationAngleChanged)
rotationAngle += pg->rotationAngle() - pg->lastRotationAngle();
- if (pg->scaleFactor() != 1.0)
+ if (pg->whatChanged() & QPinchGesture::ScaleFactorChanged)
scaleFactor += pg->scaleFactor() - pg->lastScaleFactor();
update();
}