diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index b27416e199..ccdc74f2ad 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -294,8 +294,8 @@ Cura.MachineAction MessageDialog { id: invalidIPAddressMessageDialog - x: (parent.x + (parent.width) / 2) | 0 - y: (parent.y + (parent.height) / 2) | 0 + x: parent ? (parent.x + (parent.width) / 2) : 0 + y: parent ? (parent.y + (parent.height) / 2) : 0 title: catalog.i18nc("@title:window", "Invalid IP address") text: catalog.i18nc("@text", "Please enter a valid IP address.") icon: StandardIcon.Warning diff --git a/resources/qml/RadioCheckbar.qml b/resources/qml/RadioCheckbar.qml index 4a85471095..727907254e 100644 --- a/resources/qml/RadioCheckbar.qml +++ b/resources/qml/RadioCheckbar.qml @@ -97,18 +97,17 @@ Item Component { id: disabledComponent - Rectangle + Item { height: checkboxSize width: checkboxSize - color: "transparent" Rectangle { // This can (and should) be done wiht a verticalCenter. For some reason it does work in QtCreator // but not when using the exact same QML in Cura. - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent ? parent.verticalCenter : undefined + anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined height: inactiveMarkerSize width: inactiveMarkerSize radius: Math.round(width / 2)