Save as project the extruder counter starts from 1

This commit is contained in:
Aleksei S 2018-06-06 10:47:12 +02:00
parent e152fd641b
commit dbd286e1cc

View File

@ -150,7 +150,20 @@ UM.Dialog
width: parent.width
Label
{
text: catalog.i18nc("@action:label", "Extruder %1").arg(modelData)
text: {
var extruder = Number(modelData)
var extruder_id = ""
if(!isNaN(extruder))
{
extruder_id = extruder + 1 // The extruder counter start from One and not Zero
}
else
{
extruder_id = modelData
}
return catalog.i18nc("@action:label", "Extruder %1").arg(extruder_id)
}
font.bold: true
}
Row