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

Flickable uses the flick velocity rather than the instantaneous velocity to determine whether to retain grab

    XMLWordPrintable

Details

    • f4fedd8981bf89b690bc9167bf48c1cf5e5120f2

    Description

      Flickable keeps the mouse grab if it was recently flicked and another flick is started before it has settled. However, it is using the velocity of the flick rather than the instantaneous velocity of the view, which causes it to be grabbed unless the view has come to a complete stop:

      void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
      {
          Q_Q(QDeclarativeFlickable);
          if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
              stealMouse = true; // If we've been flicked then steal the click.
          else
              stealMouse = false;
      

      Should be changed to:

      -    if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
      +    if (interactive && timeline.isActive() && (qAbs(hData.smoothVelocity.value()) > 10 || qAbs(vData.smoothVelocity.value()) > 10))
      

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            martjone Martin Jones (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes