diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-19 21:00:52 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-21 13:30:21 +0000 |
commit | 80083b0d82a70e7d4181a46a7ad205fb683bb5fc (patch) | |
tree | 9cd9f3e950586b1adc800bfab578754da2c9fd29 | |
parent | dbcc38455369f15920d0e18c9be8d909010d5af8 (diff) |
TapHandler: don't "want" every updated/stationary point
If the policy is ReleaseWithinBounds, we assumed wrongly that
wantsEventPoint() would not be asked about a point which
QQuickPointerSingleHandler::wantsEventPoint() would already rule out,
or about a point which was not grabbed either passively or exclusively.
But in fact it is asked about every point. A tap is not going to
occur unless the press occurs within bounds; if that happened, then
QQuickPointerSingleHandler::m_pointId will have been set. So a
TapHandler with this policy should remain interested in an updated
or stationary point only if it is the same one which it was already
interested in when it was pressed.
This gets the multipoint button example and autotest working.
Change-Id: I399c06071fd804cd6994d5f0153c307cec9d2f90
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 85188700d9..aeda9a0357 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -129,7 +129,7 @@ bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point) ret = parentContains(point); break; case ReleaseWithinBounds: - ret = true; + ret = point->pointId() == pointId(); break; } break; |