Process supposed to stop when already sending a job.

When using the visibility of the progress bar to detect if a job is already being sent, then make actually sure the progress bar is visible the moment the job starts, not at some unspecified time later in a method that might not even trigger if there is already a mesh ... so it's unlikely to even work, since the thing it was intended to prevent _very_ likely has the same mesh anyway.

CURA-8004
This commit is contained in:
Remco Burema 2021-04-15 16:53:01 +02:00
parent 4c5dac0dfd
commit 1eb1a943b2
No known key found for this signature in database
GPG Key ID: 215C49431D43F98C

View File

@ -191,6 +191,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
if self._progress.visible:
PrintJobUploadBlockedMessage().show()
return
self._progress.show()
# Indicate we have started sending a job.
self.writeStarted.emit(self)
@ -229,7 +230,6 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
"""
if not self._tool_path:
return self._onUploadError()
self._progress.show()
self._pre_upload_print_job = job_response # store the last uploaded job to prevent re-upload of the same file
self._api.uploadToolPath(job_response, self._tool_path, self._onPrintJobUploaded, self._progress.update,
self._onUploadError)