Skip to content

Commit

Permalink
do not assign zero to refSize
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Sep 19, 2023
1 parent b94dde1 commit 8c96f91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/ListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ BaseView {
var s

if (item) {
s = refSize = sizes[i] = (horizontal? item.width: item.height)
s = sizes[i] = (horizontal? item.width: item.height)
if (refSize === undefined || s > 0)
refSize = s
} else {
s = sizes[i]
if (s !== undefined) {
Expand All @@ -212,7 +214,9 @@ BaseView {
if (!item && visibleInModel && (renderable || s === undefined)) {
item = this._createDelegate(i)
if (item) {
s = refSize = sizes[i] = (horizontal? item.width: item.height)
s = sizes[i] = (horizontal? item.width: item.height)
if (refSize === undefined || s > 0)
refSize = s
created = true
}
}
Expand Down

0 comments on commit 8c96f91

Please sign in to comment.