Fix computation of material length from volume

The setting value was obtained wrongly.

Contributes to issue CURA-1278.
This commit is contained in:
Ghostkeeper 2016-05-23 17:03:25 +02:00
parent c6d3677d6f
commit d235b36692

View file

@ -63,6 +63,6 @@ class PrintInformation(QObject):
self.currentPrintTimeChanged.emit()
# Material amount is sent as an amount of mm^3, so calculate length from that
r = Application.getInstance().getGlobalContainerStack().getValue("material_diameter") / 2
r = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2
self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2)
self.materialAmountChanged.emit()