mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 13:33:12 +08:00
Fix computation of material length from volume
The setting value was obtained wrongly. Contributes to issue CURA-1278.
This commit is contained in:
parent
c6d3677d6f
commit
d235b36692
@ -63,6 +63,6 @@ class PrintInformation(QObject):
|
|||||||
self.currentPrintTimeChanged.emit()
|
self.currentPrintTimeChanged.emit()
|
||||||
|
|
||||||
# Material amount is sent as an amount of mm^3, so calculate length from that
|
# 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._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2)
|
||||||
self.materialAmountChanged.emit()
|
self.materialAmountChanged.emit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user