Show error if the upload failed

Contributes to issue CURA-8609.
This commit is contained in:
Ghostkeeper 2021-10-11 14:57:21 +02:00
parent ffee4a2443
commit ffd3277854
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 23 additions and 5 deletions

View file

@ -405,6 +405,8 @@ class MaterialManagementModel(QObject):
job.uploadCompleted.connect(self.exportUploadCompleted)
job.start()
def exportUploadCompleted(self):
def exportUploadCompleted(self, job_result: UploadMaterialsJob.Result):
if job_result == UploadMaterialsJob.Result.FAILED:
self._sync_all_dialog.setProperty("syncStatusText", catalog.i18nc("@text", "Something went wrong when sending the materials to the printers."))
self._export_upload_status = "idle"
self.exportUploadStatusChanged.emit()