From abe834752387bca92a2897344b470a537dbe26b7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 9 Nov 2021 15:54:42 +0100 Subject: [PATCH] Fix QML warning about not having parents It seems that the ListView doesn't always set the parent element correctly if it's not yet in view. This is a workaround that seems to work fine to remove the QML warnings about parent not being defined. Contributes to issue CURA-8561. --- plugins/Marketplace/resources/qml/PackageCard.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index 52e11ebff9..36a99410fe 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -12,7 +12,7 @@ Rectangle { property var packageData - width: parent.width + width: parent ? parent.width : 0 height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2 color: UM.Theme.getColor("main_background")