mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Fix QML null warnings
This commit is contained in:
parent
958f1a855c
commit
15f4d1231b
2 changed files with 24 additions and 8 deletions
|
@ -18,9 +18,9 @@ Item
|
|||
Cura.ExtruderIcon
|
||||
{
|
||||
id: icon
|
||||
materialColor: printCoreConfiguration.material.color
|
||||
materialColor: printCoreConfiguration !== null ? printCoreConfiguration.material.color : ""
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
extruderEnabled: printCoreConfiguration.material.brand !== "" && printCoreConfiguration.hotendID !== ""
|
||||
extruderEnabled: printCoreConfiguration !== null && printCoreConfiguration.material.brand !== "" && printCoreConfiguration.hotendID !== ""
|
||||
}
|
||||
|
||||
Column
|
||||
|
@ -35,7 +35,7 @@ Item
|
|||
|
||||
Label
|
||||
{
|
||||
text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
|
||||
text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
|
@ -44,7 +44,7 @@ Item
|
|||
}
|
||||
Label
|
||||
{
|
||||
text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
|
||||
text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("medium")
|
||||
|
@ -53,7 +53,7 @@ Item
|
|||
}
|
||||
Label
|
||||
{
|
||||
text: printCoreConfiguration.hotendID ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
|
||||
text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue