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-10-30 14:40:41 +0300
committerfieldOfView <aldo@fieldofview.com>2017-10-30 14:40:41 +0300
commit2d109090bc29ab79af81322c3ac9f2fd92c4fa3a (patch)
tree89ecb954d83ad9e8bfdaa61017e8e5d3407f0d22 /cura/PrintInformation.py
parentfc7d1210cf660147a4650a69df884e844f5f3fc8 (diff)
Show material name instead of extruder number
Diffstat (limited to 'cura/PrintInformation.py')
-rw-r--r--cura/PrintInformation.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py
index f3b178c356..c709bec20a 100644
--- a/cura/PrintInformation.py
+++ b/cura/PrintInformation.py
@@ -56,6 +56,7 @@ class PrintInformation(QObject):
self._material_lengths = []
self._material_weights = []
self._material_costs = []
+ self._material_names = []
self._pre_sliced = False
@@ -139,6 +140,12 @@ class PrintInformation(QObject):
def materialCosts(self):
return self._material_costs
+ materialNamesChanged = pyqtSignal()
+
+ @pyqtProperty("QVariantList", notify = materialNamesChanged)
+ def materialNames(self):
+ return self._material_names
+
def _onPrintDurationMessage(self, print_time, material_amounts):
self._updateTotalPrintTimePerFeature(print_time)
@@ -170,6 +177,7 @@ class PrintInformation(QObject):
self._material_lengths = []
self._material_weights = []
self._material_costs = []
+ self._material_names = []
material_preference_values = json.loads(Preferences.getInstance().getValue("cura/material_settings"))
@@ -208,10 +216,12 @@ class PrintInformation(QObject):
self._material_weights.append(weight)
self._material_lengths.append(length)
self._material_costs.append(cost)
+ self._material_names.append(material.getName())
self.materialLengthsChanged.emit()
self.materialWeightsChanged.emit()
self.materialCostsChanged.emit()
+ self.materialNamesChanged.emit()
def _onPreferencesChanged(self, preference):
if preference != "cura/material_settings":