Machine manager now creates ExtruderTrainStacks

CURA-340
This commit is contained in:
Jaime van Kessel 2016-06-05 11:34:29 +02:00
parent 2f3352bfa0
commit c79b7bdd7a
2 changed files with 33 additions and 6 deletions

View file

@ -269,9 +269,15 @@ class CuraApplication(QtApplication):
continue
file_name = urllib.parse.quote_plus(stack.getId()) + ".stack.cfg"
path = Resources.getStoragePath(self.ResourceTypes.MachineStack, file_name)
with SaveFile(path, "wt", -1, "utf-8") as f:
f.write(data)
stack_type = stack.getMetaDataEntry("type", None)
path = None
if not stack_type:
path = Resources.getStoragePath(self.ResourceTypes.MachineStack, file_name)
elif stack_type == "extruder":
path = Resources.getStoragePath(self.ResourceTypes.ExtruderStack, file_name)
if path:
with SaveFile(path, "wt", -1, "utf-8") as f:
f.write(data)
@pyqtSlot(result = QUrl)