diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-09-12 14:05:06 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-09-13 08:35:48 +0000 |
commit | c4c27857e0de964a57ae2b919a045f3a82206f56 (patch) | |
tree | dce1cba8f204c6c098c8156b8c2dd129cfdd3ced /src/quick/handlers/qquickpinchhandler.cpp | |
parent | 338cf32da6e64866ef598749ebe47854a0fb120e (diff) |
PinchHandler: update centroid property when handling native gesture
The gesture occurs at a location. It so happens that when the gesture
begins, macOS holds the position fixed; but on other OSes, maybe
the position could move around, if dragging during pinch is allowed.
Change-Id: Ie3184b5002548cb8fff3b3b6c471966ae4b8f6d9
Fixes: QTBUG-70075
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index 360dac737e..e6442e7258 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -284,6 +284,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) qreal dist = 0; #if QT_CONFIG(gestures) if (const auto gesture = event->asPointerNativeGestureEvent()) { + m_centroid.reset(event->point(0)); switch (gesture->type()) { case Qt::EndNativeGesture: m_activeScale = 1; |