Fix job name

This commit is contained in:
ChrisTerBeke 2019-07-30 15:30:34 +02:00
parent 1ec2ac4118
commit 7398f08b27
2 changed files with 3 additions and 4 deletions

View file

@ -194,7 +194,6 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
## Handler for when the print job was created locally. ## Handler for when the print job was created locally.
# It can now be sent over the cloud. # It can now be sent over the cloud.
def _onPrintJobCreated(self, job: WriteFileJob) -> None: def _onPrintJobCreated(self, job: WriteFileJob) -> None:
self._progress.show()
self._tool_path = job.getOutput() self._tool_path = job.getOutput()
request = CloudPrintJobUploadRequest( request = CloudPrintJobUploadRequest(
job_name=job.getFileName(), job_name=job.getFileName(),

View file

@ -19,14 +19,14 @@ class ExportFileJob(WriteFileJob):
Logger.log("e", "Missing file or mesh writer!") Logger.log("e", "Missing file or mesh writer!")
return return
super().__init__(self._mesh_format_handler.writer, self._mesh_format_handler.createStream(), nodes,
self._mesh_format_handler.file_mode)
# Determine the filename. # Determine the filename.
job_name = CuraApplication.getInstance().getPrintInformation().jobName job_name = CuraApplication.getInstance().getPrintInformation().jobName
extension = self._mesh_format_handler.preferred_format.get("extension", "") extension = self._mesh_format_handler.preferred_format.get("extension", "")
self.setFileName(f"{job_name}.{extension}") self.setFileName(f"{job_name}.{extension}")
super().__init__(self._mesh_format_handler.writer, self._mesh_format_handler.createStream(), nodes,
self._mesh_format_handler.file_mode)
## Get the mime type of the selected export file type. ## Get the mime type of the selected export file type.
def getMimeType(self) -> str: def getMimeType(self) -> str:
return self._mesh_format_handler.mime_type return self._mesh_format_handler.mime_type