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

QSwipeGestureRecognizer doesn't cancel the gesture on direction change

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • 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)

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes