Fix extension when sending to printer

It should use the extension of the preferred format.

Contributes to issue CURA-5097.
This commit is contained in:
Ghostkeeper 2018-03-19 15:17:10 +01:00
parent c9a23d5ca3
commit 6f9e0431bb
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -197,7 +197,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
# Add user name to the print_job
parts.append(self._createFormPart("name=owner", bytes(self._getUserName(), "utf-8"), "text/plain"))
file_name = "%s.gcode.gz" % Application.getInstance().getPrintInformation().jobName
file_name = Application.getInstance().getPrintInformation().jobName + "." + preferred_format["extension"]
while not job.isFinished():
sleep(0.1)