diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-11-04 15:16:33 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-11-05 11:54:47 (GMT) |
commit | f4450efb6fbc9fd0e592d5bc3bce37d5bf272984 (patch) | |
tree | 14afbacb5e11d64c1c87be2b8a128d1595fa67bb /examples | |
parent | 847be4eadc3bfc92daad728ce9f70e658e380556 (diff) | |
download | Qt-f4450efb6fbc9fd0e592d5bc3bce37d5bf272984.zip Qt-f4450efb6fbc9fd0e592d5bc3bce37d5bf272984.tar.gz Qt-f4450efb6fbc9fd0e592d5bc3bce37d5bf272984.tar.bz2 |
Small improvement in the imagegesture example.
We don't actually need to fill the backgroup in the example as it will be done
by Qt.
And when double-clicked we need to reset the scale factor properly.
Reviewed-by: trustme
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gestures/imagegestures/imagewidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/gestures/imagegestures/imagewidget.cpp index 96400c4..80bd6a6 100644 --- a/examples/gestures/imagegestures/imagewidget.cpp +++ b/examples/gestures/imagegestures/imagewidget.cpp @@ -76,7 +76,6 @@ bool ImageWidget::event(QEvent *event) void ImageWidget::paintEvent(QPaintEvent*) { QPainter p(this); - p.fillRect(rect(), Qt::white); float iw = currentImage.width(); float ih = currentImage.height(); @@ -95,6 +94,7 @@ void ImageWidget::mouseDoubleClickEvent(QMouseEvent *) { rotationAngle = 0; scaleFactor = 1; + currentStepScaleFactor = 1; verticalOffset = 0; horizontalOffset = 0; update(); |