diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-19 21:32:27 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-04-21 13:30:28 +0000 |
commit | fdb7c432514c828a7a921270d55e1c134151e19a (patch) | |
tree | f10b7b5c7dd7e61fee387588ce86f9d4d1d90dd9 /src | |
parent | 80083b0d82a70e7d4181a46a7ad205fb683bb5fc (diff) |
QQPSingleHandler: verify wantsEventPoint() even when pointId is chosen
This allows TapHandler to veto the "wanting" during an update, if
the policy is violated. For example, if the policy is WithinBounds,
and the point leaves the bounds, it will say that it does not want
the point; but without this change, it is not asked again when the
point is moved outside the bounds.
Change-Id: Id764b3d24966ce9c3c4795e9f2a0aa37821caa42
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/handlers/qquickpointersinglehandler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/quick/handlers/qquickpointersinglehandler.cpp b/src/quick/handlers/qquickpointersinglehandler.cpp index 6a4c4da7e6..5d61c75fbc 100644 --- a/src/quick/handlers/qquickpointersinglehandler.cpp +++ b/src/quick/handlers/qquickpointersinglehandler.cpp @@ -76,11 +76,10 @@ bool QQuickPointerSingleHandler::wantsPointerEvent(QQuickPointerEvent *event) int c = event->pointCount(); for (int i = 0; i < c; ++i) { QQuickEventPoint *p = event->point(i); - if (p->pointId() == m_pointId) { - point = p; - ++candidatePointCount; - } else if (wantsEventPoint(p)) { + if (wantsEventPoint(p)) { ++candidatePointCount; + if (p->pointId() == m_pointId) + point = p; } } if (point) { |