Decreased the progress added when 0 was returned

Turned out that by adding 0.1, it started at 10%
This commit is contained in:
Jaime van Kessel 2016-06-14 16:01:06 +02:00
parent cadf5d85b7
commit ac4dbe2304

View file

@ -190,7 +190,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
progress = json.loads(bytes(reply.readAll()).decode("utf-8"))["progress"]
## If progress is 0 add a bit so another print can't be sent.
if progress == 0:
progress += 0.1
progress += 0.001
self.setProgress(progress)
elif reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 404:
self.setProgress(0) # No print job found, so there can't be progress!