From d6e560c356791d516856c38566104fbb2bb6c730 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 5 Dec 2018 13:33:31 +0100 Subject: When there are no points to grab, then we should return false If there are no points to grab then it should not indicate that it was able to grab points. Otherwise it can cause a handler to be active when it has not valid points to work with. This can happen if you do a pinch gesture on a DragHandler as the points are not valid by default then. Fixes: QTBUG-71972 Change-Id: Ib1c48e5a3777f4118944accfa2bc92edf0209884 Reviewed-by: Shawn Rutledge --- src/quick/handlers/qquickmultipointhandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp index 2f4e9d45e9..228c99bb12 100644 --- a/src/quick/handlers/qquickmultipointhandler.cpp +++ b/src/quick/handlers/qquickmultipointhandler.cpp @@ -309,6 +309,8 @@ void QQuickMultiPointHandler::acceptPoints(const QVector &po bool QQuickMultiPointHandler::grabPoints(QVector points) { + if (points.isEmpty()) + return false; bool allowed = true; for (QQuickEventPoint* point : points) { if (point->exclusiveGrabber() != this && !canGrab(point)) { -- cgit v1.2.3