diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2022-08-02 14:28:56 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2022-08-27 00:31:21 +0200 |
commit | 5647527a8cde84b51fff66fc482f02435770b3dd (patch) | |
tree | f6bd4cdeca16fb23ad82d77766f147eab6e737b6 /src/qml/jit | |
parent | 69d61fecf2deee7510f5f2448614174683744d82 (diff) |
Flickable: let changing contentItem pos also affect the drag starting pos
When calling the setContentX(qreal) and setContentY(qreal) functions,
the flickable would not update the drag starting position if they were
called in the middle of a dragging operation.
This patch makes those function update the drag starting position, so
that the drag will take into account the external changes to the
contentItem position, and not make any massive leaps on the next call to
drag() after changing the contentItem position directly.
Note that vData.pressPos and hData.pressPos are set to the x and y
position of the contentItem at the beginning of a drag operation.
They are unrelated to the mouse position.
The bug QTBUG-104966 will be fixed from this, since QQuickItemView::setModel() calls
QQuickListViewPrivate::setPosition() which calls
QQuickFlickable::setContentX/Y().
The QQuickFlickable::setContentX/Y functions are public (part of the public
API). They will update the timeline value for the x and y axis, which
will as a result also call setViewportX/Y, which calls setX/Y for the
contentItem itself.
Done-with: Jan Arve Sæther <jan-arve.saether@qt.io>
Fixes: QTBUG-104966
Pick-to: 6.2 6.3 6.4 5.15
Change-Id: Id5165e1ff37a07b94be8c1cc152e86dfcc13d1c6
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/qml/jit')
0 files changed, 0 insertions, 0 deletions