path: root/examples
diff options
authorStephen Kelly <ske@ableton.com>2016-06-01 11:40:45 +0200
committerStephen Kelly <ske@ableton.com>2016-06-21 11:51:46 +0000
commit5d23470b8d0bacb0e0ba074672f94e526cc9e456 (patch)
treea58e6907367a59b74020dff0339763a5627b1a01 /examples
parent4c1dd3efb0a28c022e0968ba80737de8694c6e4c (diff)
Report changes correctly when inserting into a ListView
Commit v5.6.0-beta1~7 (ListView: Sanitize visibleItems list after model insertions, 2015-12-07) introduced sanitizing of the container of visibleItems, but it did not affect the return value of the QQuickListViewPrivate::applyInsertionChange function. The return value is used in QQuickItemViewPrivate::layout() to determine whether the layouting should proceed, or an early return is possible instead. If the layouting does not proceed, then the newly inserted visible items do not get painted, resulting in the linked bug. The return value of the QQuickListViewPrivate::applyInsertionChange function was previously determined by whether the new count of visible items is greater than the previous count. After the sanitation in commit v5.6.0-beta1~7, this numeric comparison is no longer a good indicator of whether a repaint is needed. Change the return value to indicate whether new items were inserted which are visible in a more-direct way. Verify that visible items are initialized correctly in tests. They should not be 'culled'. It is necessary to invoke the layout method first to clear the forceLayout state. Two pre-existing tests fail before the fix in this patch. Change-Id: I625f1e02bf7001834adb147161a1e478a0ce2a0d Task-number: QTBUG-53263 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions