PostPrintjobFinished now hides messages & resets state

CL-541
This commit is contained in:
Jaime van Kessel 2017-11-30 11:44:18 +01:00
parent f30f0a7194
commit 70cfbf0180
2 changed files with 5 additions and 3 deletions

View file

@ -106,8 +106,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
self.postFormWithParts("print_jobs/", parts, onFinished=self._onPostPrintJobFinished, onProgress=self._onUploadPrintJobProgress) self.postFormWithParts("print_jobs/", parts, onFinished=self._onPostPrintJobFinished, onProgress=self._onUploadPrintJobProgress)
def _onPostPrintJobFinished(self, reply): def _onPostPrintJobFinished(self, reply):
print("POST PRINTJOB DONE! YAY!", reply.readAll()) self._progress_message.hide()
pass self._compressing_gcode = False
self._sending_gcode = False
Application.getInstance().showPrintMonitor.emit(False)
def _onUploadPrintJobProgress(self, bytes_sent, bytes_total): def _onUploadPrintJobProgress(self, bytes_sent, bytes_total):
if bytes_total > 0: if bytes_total > 0:

View file

@ -382,7 +382,7 @@ Rectangle
{ {
case "printing": case "printing":
case "post_print": case "post_print":
return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.time_total - printJob.time_elapsed) return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.timeTotal - printJob.timeElapsed)
case "wait_cleanup": case "wait_cleanup":
return catalog.i18nc("@label", "Clear build plate") return catalog.i18nc("@label", "Clear build plate")
case "sent_to_printer": case "sent_to_printer":