mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue