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

@ -148,9 +148,22 @@ UM.Dialog
{ {
height: childrenRect.height height: childrenRect.height
width: parent.width width: parent.width
Label 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 font.bold: true
} }
Row Row