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:
authorfieldOfView <aldo@fieldofview.com>2017-03-28 21:17:51 +0300
committerfieldOfView <aldo@fieldofview.com>2017-03-28 21:17:51 +0300
commitba06f06cd0e5dfbf085826d14b9f270646fdab5c (patch)
tree5e32ffbe7506c4fa757305a7bdf44d242ae4f74a /cura/PrintInformation.py
parent67d66905ba1199a161b580292c0837811088a2c4 (diff)
Optimize code
Diffstat (limited to 'cura/PrintInformation.py')
-rw-r--r--cura/PrintInformation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py
index e6ed313db2..b066a1693d 100644
--- a/cura/PrintInformation.py
+++ b/cura/PrintInformation.py
@@ -126,6 +126,7 @@ class PrintInformation(QObject):
return
# Material amount is sent as an amount of mm^3, so calculate length from that
+ radius = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2
self._material_lengths = []
self._material_weights = []
self._material_costs = []
@@ -160,7 +161,6 @@ class PrintInformation(QObject):
else:
cost = 0
- radius = Application.getInstance().getGlobalContainerStack().getProperty("material_diameter", "value") / 2
if radius != 0:
length = round((amount / (math.pi * radius ** 2)) / 1000, 2)
else: