Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-04-03 12:53:40 +0300
committerGhostkeeper <rubend@tutanota.com>2019-04-03 12:53:40 +0300
commitae9395aebb7a7b6331bde5496db804b46dc7c599 (patch)
tree2b6895b9a3f2c1596573985b6436b9b4851b7da6 /resources/qml/ActionPanel
parentdf32f3e263b92e2c7ec7c9270d4270c663d1703c (diff)
parent5e66564c00bbdf8acc67b63c4271d3d0b778ff0d (diff)
Merge branch 'master' into WIP_onboarding
Diffstat (limited to 'resources/qml/ActionPanel')
-rw-r--r--resources/qml/ActionPanel/OutputProcessWidget.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml
index f4505c620c..7e76768cb4 100644
--- a/resources/qml/ActionPanel/OutputProcessWidget.qml
+++ b/resources/qml/ActionPanel/OutputProcessWidget.qml
@@ -68,6 +68,7 @@ Column
property var printMaterialLengths: PrintInformation.materialLengths
property var printMaterialWeights: PrintInformation.materialWeights
+ property var printMaterialCosts: PrintInformation.materialCosts
text:
{
@@ -77,6 +78,7 @@ Column
}
var totalLengths = 0
var totalWeights = 0
+ var totalCosts = 0.0
if (printMaterialLengths)
{
for(var index = 0; index < printMaterialLengths.length; index++)
@@ -85,9 +87,16 @@ Column
{
totalLengths += printMaterialLengths[index]
totalWeights += Math.round(printMaterialWeights[index])
+ var cost = printMaterialCosts[index] == undefined ? 0.0 : printMaterialCosts[index]
+ totalCosts += cost
}
}
}
+ if(totalCosts > 0)
+ {
+ var costString = "%1 %2".arg(UM.Preferences.getValue("cura/currency")).arg(totalCosts.toFixed(2))
+ return totalWeights + "g · " + totalLengths.toFixed(2) + "m · " + costString
+ }
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
}
source: UM.Theme.getIcon("spool")