mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 11:05:57 +08:00
Simplify showing each material length individually
CURA-1687
This commit is contained in:
parent
c4a2e659e3
commit
08f2143790
@ -194,17 +194,15 @@ Rectangle {
|
|||||||
color: UM.Theme.getColor("text_subtext")
|
color: UM.Theme.getColor("text_subtext")
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
var material_lengths;
|
var amounts = [];
|
||||||
if(base.printMaterialAmounts) {
|
if(base.printMaterialAmounts) {
|
||||||
material_lengths = ""
|
|
||||||
for(var index = 0; index < base.printMaterialAmounts.length; index++) {
|
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 {
|
} 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…
x
Reference in New Issue
Block a user