From 7236b0dfdb9ae805f4ba595def2b696859aa3613 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 12 Sep 2017 15:03:37 +0200 Subject: PinchHandler: correct the usage of min/max x/y for movement bounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QRectF constructor takes x, y, width, height not x1, y1, x2, y2 Change-Id: I84f9e62ef7a6587a319ed33d8937365f94fdba3b Reviewed-by: Jan Arve Sæther --- src/quick/handlers/qquickpinchhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index b1a5779981..2cc5135147 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -247,7 +247,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) // TODO check m_pinchOrigin: right now it acts like it's set to PinchCenter m_centroid = touchPointCentroid(); m_centroidVelocity = touchPointCentroidVelocity(); - QRectF bounds(m_minimumX, m_minimumY, m_maximumX, m_maximumY); + QRectF bounds(m_minimumX, m_minimumY, m_maximumX - m_minimumX, m_maximumY - m_minimumY); // avoid mapping the minima and maxima, as they might have unmappable values // such as -inf/+inf. Because of this we perform the bounding to min/max in local coords. QPointF centroidParentPos; -- cgit v1.2.3