diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-01 19:44:29 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-01 19:44:29 +0200 |
commit | 6e008cd57955c8029671c4c92250b86767f8ec1f (patch) | |
tree | ad5fe258f7203a733fbdd231918acd540727a2fb /examples/touch/fingerpaint/scribblearea.cpp | |
parent | 275709fb43c154ccb1d95391f4829bd1aecebb12 (diff) | |
parent | 6fba3c1904aa7601722a70099d88126191cf60cf (diff) |
Merge 5.5 into 5.5.0
Change-Id: I27921a25a0fc56afb5429e40fc1e9b4b9a645a9a
Diffstat (limited to 'examples/touch/fingerpaint/scribblearea.cpp')
-rw-r--r-- | examples/touch/fingerpaint/scribblearea.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp index 469c6b1a70..05598c134c 100644 --- a/examples/touch/fingerpaint/scribblearea.cpp +++ b/examples/touch/fingerpaint/scribblearea.cpp @@ -187,13 +187,14 @@ bool ScribbleArea::event(QEvent *event) foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) { switch (touchPoint.state()) { case Qt::TouchPointStationary: - // don't do anything if this touch point hasn't moved + case Qt::TouchPointReleased: + // don't do anything if this touch point hasn't moved or has been released continue; default: { QRectF rect = touchPoint.rect(); if (rect.isEmpty()) { - qreal diameter = MinimumDiameter; + qreal diameter = MaximumDiameter; if (touch->device()->capabilities() & QTouchDevice::Pressure) diameter = MinimumDiameter + (MaximumDiameter - MinimumDiameter) * touchPoint.pressure(); rect.setSize(QSizeF(diameter, diameter)); |