diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-13 12:17:14 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-18 09:25:20 +0000 |
commit | e8570bd1af74724b6fae1ac8a2d8bbdfee7a6504 (patch) | |
tree | 1a585c6ab589629d9f8c2527f44a0027d2ea1b97 /src/quick/scenegraph/qsgdistancefieldglyphnode_p.h | |
parent | d8d6186b66db713a2234e99ca7e1c98dab2936f6 (diff) |
QQuickItemView: Clear pending changes when refilling
Generally the bufferedChanges are an "extension" of the currentChanges,
which can just not be applied at the moment because we are in a layout
phase. If we regenerate or clear the whole view in the mean time, the
bufferedChanges become just as invalid as the currentChanges.
On top of that, refilling can trigger further changes, part of which
will be applied during the refilling. As that leaves us in an
inconsistent state, we need to loop the refilling until no further
changes are generated. As the changes might affect items that are
already visible, and therefore not subject to refilling, we need to
clear all the items before refilling in this case.
In QTBUG-46488 things are added in the onCompleted callback of the
delegates (by expanding the tree view, which translates into adding
rows to the list view). Depending on where you add the new items, the
list view might pick them up when iterating the model on refill() or
it might create delegates for the same model entry twice. So, if that
happens we need to discard the result and refill again.
Task-number: QTBUG-46488
Change-Id: Ie4e0a731f7feda6aa962b6cb9a6cd5c3bf90486e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.h')
0 files changed, 0 insertions, 0 deletions