diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2022-12-09 18:40:54 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-12-19 14:56:35 +0000 |
commit | 8142a7944f7d4765cfaeddb7bf57edeed36e7b88 (patch) | |
tree | 6aef50c233dda9a41a3152f09739addfaeeb409e /tests/auto/qml/qmltyperegistrar/VersionZero/version_zero_type.h | |
parent | f456d5311d1c4766a4f633def354d00beec77ca8 (diff) |
Flickable: prevent fixup() from being called while dragging
A previous patch 5647527a8cde84b51fff66fc482f02435770b3dd causes
a regression. The purpose of the patch, that caused this regression,
was to update the pressPos variables, in cases where the contentItem's
geometry was modified externally, while a user were dragging the
contentItem around.
The mistake that was made, was how width and height changes were
handled. We had previously added logic in setContentWidth() and
setContentHeight() that would call fixup() (with immediate fixupMode)
to ensure that the contentItem would immediately be repositioned
inside the flickable's viewport, if the contentItem was being dragged.
It turns out that setContentWidth() and setContentHeight() are being
called from QQuickItemViewPrivate::updateViewport(), which happens
quite often, while dragging. This would make fixup() and dragging
constantly interfere with each other, since they'd not always agree on
a specific position for the contentItem.
This patch reverts the changes made to setContentWidth() and
setContentHeight(), since it turns out that those changes weren't
necessary after all. QQuickFlickablePrivate::itemGeometryChanged() only
calls viewportMoved() on x and y changes anyways.
Done-with: Jan Arve Sæther <jan-arve.saether@qt.io>
Done-with: Santhosh Kumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
Fixes: QTBUG-109140
Change-Id: I0bddf8685d3afc1ae04b2c092212d3c1bd742c3b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit b307bf3c4f63c6e04874a972c747f18e18ddc199)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qmltyperegistrar/VersionZero/version_zero_type.h')
0 files changed, 0 insertions, 0 deletions