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:
authorDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-01-19 12:34:04 +0300
committerDiego Prado Gesto <d.pradogesto@ultimaker.com>2018-01-19 12:34:04 +0300
commita6acf4a4af1dfd6bd6f4537891754d3b9612482b (patch)
tree5518715d72c460f1c9559d293c89d663d0ad7721 /plugins/GCodeWriter
parentd03ecf3cba84d1551d6cb979ef0fb094da92a3e2 (diff)
CURA-4829 Do not save the quality changes profile in the GCode if the
containers are empty. Change the message when trying to import a GCode as a profile, but not profile was stored.
Diffstat (limited to 'plugins/GCodeWriter')
-rw-r--r--plugins/GCodeWriter/GCodeWriter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py
index 95c48c4d9e..2dfaf5aef7 100644
--- a/plugins/GCodeWriter/GCodeWriter.py
+++ b/plugins/GCodeWriter/GCodeWriter.py
@@ -107,7 +107,7 @@ class GCodeWriter(MeshWriter):
prefix_length = len(prefix)
container_with_profile = stack.qualityChanges
- if not container_with_profile:
+ if container_with_profile.getId() == "empty_quality_changes":
Logger.log("e", "No valid quality profile found, not writing settings to GCode!")
return ""
@@ -123,9 +123,9 @@ class GCodeWriter(MeshWriter):
serialized = flat_global_container.serialize()
data = {"global_quality": serialized}
- for extruder in sorted(ExtruderManager.getInstance().getMachineExtruders(stack.getId()), key = lambda k: k.getMetaDataEntry("position")):
+ for extruder in sorted(stack.extruders.values(), key = lambda k: k.getMetaDataEntry("position")):
extruder_quality = extruder.qualityChanges
- if not extruder_quality:
+ if extruder_quality.getId() == "empty_quality_changes":
Logger.log("w", "No extruder quality profile found, not writing quality for extruder %s to file!", extruder.getId())
continue
flat_extruder_quality = self._createFlattenedContainerInstance(extruder.getTop(), extruder_quality)