mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-03 10:44:18 +08:00
Merge pull request #1780 from LipuFei/fix_jobspec_tofix
Fix TypeError in JobSpec.qml due to material cost being undefined
This commit is contained in:
commit
5159894d5b
@ -212,8 +212,9 @@ Item {
|
||||
{
|
||||
lengths.push(base.printMaterialLengths[index].toFixed(2));
|
||||
weights.push(String(Math.floor(base.printMaterialWeights[index])));
|
||||
costs.push(base.printMaterialCosts[index].toFixed(2));
|
||||
if(base.printMaterialCosts[index] > 0)
|
||||
var cost = base.printMaterialCosts[index] == undefined ? 0 : base.printMaterialCosts[index].toFixed(2);
|
||||
costs.push(cost);
|
||||
if(cost > 0)
|
||||
{
|
||||
someCostsKnown = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user