mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Simplify showing each material length individually
CURA-1687
This commit is contained in:
parent
c4a2e659e3
commit
08f2143790
1 changed files with 4 additions and 6 deletions
|
@ -194,17 +194,15 @@ Rectangle {
|
|||
color: UM.Theme.getColor("text_subtext")
|
||||
text:
|
||||
{
|
||||
var material_lengths;
|
||||
var amounts = [];
|
||||
if(base.printMaterialAmounts) {
|
||||
material_lengths = ""
|
||||
for(var index = 0; index < base.printMaterialAmounts.length; index++) {
|
||||
material_lengths += base.printMaterialAmounts[index].toFixed(2).toString() + " + "
|
||||
amounts.push(base.printMaterialAmounts[index].toFixed(2));
|
||||
}
|
||||
material_lengths = material_lengths.substr(0, material_lengths.length - 3)
|
||||
} else {
|
||||
material_lengths = "0.00"
|
||||
amounts = ["0.00"];
|
||||
}
|
||||
return catalog.i18nc("@label", "%1 m").arg(material_lengths)
|
||||
return catalog.i18nc("@label", "%1 m").arg(amounts.join(" + "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue