mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:26:10 +08:00
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.
This commit is contained in:
parent
2ce31d0e71
commit
abe8347523
@ -12,7 +12,7 @@ Rectangle
|
|||||||
{
|
{
|
||||||
property var packageData
|
property var packageData
|
||||||
|
|
||||||
width: parent.width
|
width: parent ? parent.width : 0
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
|
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
|
||||||
|
|
||||||
color: UM.Theme.getColor("main_background")
|
color: UM.Theme.getColor("main_background")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user