mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Fix error
CURA-49
This commit is contained in:
parent
8deb0dc274
commit
53c1c738d5
1 changed files with 2 additions and 2 deletions
|
@ -257,13 +257,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
if progress == 0:
|
if progress == 0:
|
||||||
progress += 0.001
|
progress += 0.001
|
||||||
self.setProgress(progress)
|
self.setProgress(progress)
|
||||||
self._updateJobState(json_data["state"])
|
self._setJobState(json_data["state"])
|
||||||
self.setTimeElapsed(json_data["time_elapsed"])
|
self.setTimeElapsed(json_data["time_elapsed"])
|
||||||
self.setTimeTotal(json_data["time_total"])
|
self.setTimeTotal(json_data["time_total"])
|
||||||
self.setJobName(json_data["name"])
|
self.setJobName(json_data["name"])
|
||||||
elif reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 404:
|
elif reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 404:
|
||||||
self.setProgress(0) # No print job found, so there can't be progress!
|
self.setProgress(0) # No print job found, so there can't be progress!
|
||||||
self._updateJobState("")
|
self._setJobState("")
|
||||||
elif "snapshot" in reply.url().toString(): # Status update from image:
|
elif "snapshot" in reply.url().toString(): # Status update from image:
|
||||||
if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 200:
|
if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 200:
|
||||||
self._camera_image.loadFromData(reply.readAll())
|
self._camera_image.loadFromData(reply.readAll())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue