mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
PostReply is now always reset correctly
CURA-2630
This commit is contained in:
parent
2638365839
commit
a9b45572cc
1 changed files with 5 additions and 0 deletions
|
@ -631,6 +631,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
self._compressing_print = False
|
||||
if self._post_reply:
|
||||
self._post_reply.abort()
|
||||
self._post_reply = None
|
||||
Application.getInstance().showPrintMonitor.emit(False)
|
||||
|
||||
## Attempt to start a new print.
|
||||
|
@ -747,6 +748,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
self._post_reply.abort()
|
||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
Logger.log("d", "Uploading of print failed after %s", time() - self._send_gcode_start)
|
||||
self._post_reply = None
|
||||
self._progress_message.hide()
|
||||
|
||||
self.setConnectionState(ConnectionState.error)
|
||||
|
@ -901,6 +903,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
elif "print_job" in reply_url:
|
||||
reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||
Logger.log("d", "Uploading of print succeeded after %s", time() - self._send_gcode_start)
|
||||
# Only reset the _post_reply if it was the same one.
|
||||
if reply == self._post_reply:
|
||||
self._post_reply = None
|
||||
self._progress_message.hide()
|
||||
|
||||
elif reply.operation() == QNetworkAccessManager.PutOperation:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue