Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12736

QSwipeGestureRecognizer doesn't cancel the gesture on direction change

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.4.0
    • 4.7.0, 5.4.0 Beta
    • Core: Event loop
    • None
    • Windows 7, Dell Latitude XT2
    • 88057e3407aa16d0a9dc9dcc6d0ea6174dce693b *(qtbase/5.4, 24.10.2014, 5.4)

      qstandardgestures.cpp
      if (xDistance > MoveThreshold || yDistance > MoveThreshold) {
         // measure the distance to check if the direction changed
         ...
         if (d->verticalDirection != vertical || d->horizontalDirection != horizontal) {
            // the user has changed the direction!
            result = QGestureRecognizer::CancelGesture;
         }
         result = QGestureRecognizer::TriggerGesture;
      }
      

      should be changed to

      qstandardgestures.cpp
      if (xDistance > MoveThreshold || yDistance > MoveThreshold) {
         // measure the distance to check if the direction changed
         ...
         if (d->verticalDirection != vertical || d->horizontalDirection != horizontal) {
            // the user has changed the direction!
            result = QGestureRecognizer::CancelGesture;
         }
         else
            result = QGestureRecognizer::TriggerGesture;
      }
      

      Otherwise the swipe gesture isn't canceled and therefore not reset if the user changes the swiping direction.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ablasche Alex Blasche
            c.schneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes