From c4c27857e0de964a57ae2b919a045f3a82206f56 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 12 Sep 2018 14:05:06 +0200 Subject: PinchHandler: update centroid property when handling native gesture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/quick/handlers/qquickpinchhandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/handlers/qquickpinchhandler.cpp') 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; -- cgit v1.2.3