Make extruder name recover if it returns null

If it returns null, you'd get an error that it can't assign [undefined] to a text field.

Contributes to issue CURA-3161.
This commit is contained in:
Ghostkeeper 2017-02-10 14:55:06 +01:00
parent 2f8fc05181
commit b69ec56f66
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -88,7 +88,7 @@ Column
Label //Extruder name.
{
text: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
text: (machineExtruderCount.properties.value > 1 && extrudersModel.getItem(index).name != null) ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
color: UM.Theme.getColor("text")
anchors.left: parent.left
anchors.top: parent.top