Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-10-11 14:11:54 +0300
committerGhostkeeper <rubend@tutanota.com>2021-10-11 14:11:54 +0300
commite7b49ee551590ce5652d18b782350772e33e8abb (patch)
treea98da20acda66094aed09f20a9b18645e33e695b /cura/PrinterOutput
parent9729f4f3d2320a23181b544f4188089b35a382ef (diff)
Disable sync button while in progress
Need to show a bit more feedback I think. Let's see what the design said... Contributes to issue CURA-8609.
Diffstat (limited to 'cura/PrinterOutput')
-rw-r--r--cura/PrinterOutput/UploadMaterialsJob.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cura/PrinterOutput/UploadMaterialsJob.py b/cura/PrinterOutput/UploadMaterialsJob.py
index e675524ec4..13e97a5093 100644
--- a/cura/PrinterOutput/UploadMaterialsJob.py
+++ b/cura/PrinterOutput/UploadMaterialsJob.py
@@ -11,6 +11,7 @@ from cura.UltimakerCloud import UltimakerCloudConstants # To know where the API
from cura.UltimakerCloud.UltimakerCloudScope import UltimakerCloudScope # To know how to communicate with this server.
from UM.Job import Job
from UM.Logger import Logger
+from UM.Signal import Signal
from UM.TaskManagement.HttpRequestManager import HttpRequestManager # To call the API.
from UM.TaskManagement.HttpRequestScope import JsonDecoratorScope
@@ -33,6 +34,8 @@ class UploadMaterialsJob(Job):
super().__init__()
self._scope = JsonDecoratorScope(UltimakerCloudScope(cura.CuraApplication.CuraApplication.getInstance())) # type: JsonDecoratorScope
+ uploadCompleted = Signal()
+
def run(self):
archive_file = tempfile.NamedTemporaryFile("wb", delete = False)
archive_file.close()
@@ -78,6 +81,7 @@ class UploadMaterialsJob(Job):
self.setResult(self.Result.FAILED)
return
self.setResult(self.Result.SUCCESS)
+ self.uploadCompleted.emit()
def onError(self, reply: "QNetworkReply", error: Optional["QNetworkReply.NetworkError"]):
pass # TODO: Handle errors. \ No newline at end of file