Restore check for parent before getting its width

Delegates that are outside of the viewport may have no parent any more. Don't attempt to find their parents' width.

Contributes to issue CURA-8565.
This commit is contained in:
Ghostkeeper 2021-11-29 16:32:55 +01:00 committed by Jelle Spijker
parent 0069182c6b
commit 76e43759c7
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A

View file

@ -65,7 +65,7 @@ ListView
delegate: MouseArea delegate: MouseArea
{ {
width: parent.width width: parent ? parent.width : 0
height: childrenRect.height height: childrenRect.height
onClicked: onClicked: