mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:19:04 +08:00
Actually fix QML nullptr warnings for real.
This commit is contained in:
parent
31434ebde8
commit
7a1850a87b
@ -294,8 +294,8 @@ Cura.MachineAction
|
|||||||
MessageDialog
|
MessageDialog
|
||||||
{
|
{
|
||||||
id: invalidIPAddressMessageDialog
|
id: invalidIPAddressMessageDialog
|
||||||
x: (parent.x + (parent.width) / 2) | 0
|
x: parent ? (parent.x + (parent.width) / 2) : 0
|
||||||
y: (parent.y + (parent.height) / 2) | 0
|
y: parent ? (parent.y + (parent.height) / 2) : 0
|
||||||
title: catalog.i18nc("@title:window", "Invalid IP address")
|
title: catalog.i18nc("@title:window", "Invalid IP address")
|
||||||
text: catalog.i18nc("@text", "Please enter a valid IP address.")
|
text: catalog.i18nc("@text", "Please enter a valid IP address.")
|
||||||
icon: StandardIcon.Warning
|
icon: StandardIcon.Warning
|
||||||
|
@ -97,18 +97,17 @@ Item
|
|||||||
Component
|
Component
|
||||||
{
|
{
|
||||||
id: disabledComponent
|
id: disabledComponent
|
||||||
Rectangle
|
Item
|
||||||
{
|
{
|
||||||
height: checkboxSize
|
height: checkboxSize
|
||||||
width: checkboxSize
|
width: checkboxSize
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
// This can (and should) be done wiht a verticalCenter. For some reason it does work in QtCreator
|
// 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.
|
// but not when using the exact same QML in Cura.
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent ? parent.verticalCenter : undefined
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
||||||
height: inactiveMarkerSize
|
height: inactiveMarkerSize
|
||||||
width: inactiveMarkerSize
|
width: inactiveMarkerSize
|
||||||
radius: Math.round(width / 2)
|
radius: Math.round(width / 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user