From 416f695610ffc931e8517b5998a0002cab99abb8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 31 May 2018 11:52:36 +0200 Subject: [PATCH] Canceling sending job to cluster no longer results in "still sending print" message. Previously it would always show this, requiring a restart of Cura before print could be sent. CL-913 --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 4 ++++ plugins/UM3NetworkPrinting/PrintWindow.qml | 1 + 2 files changed, 5 insertions(+) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index 282d507e09..4c63115bb4 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -148,6 +148,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): def selectPrinter(self, target_printer: str = "") -> None: self._sending_job.send(target_printer) + @pyqtSlot() + def cancelPrintSelection(self) -> None: + self._sending_gcode = False + ## Greenlet to send a job to the printer over the network. # # This greenlet gets called asynchronously in requestWrite. It is a diff --git a/plugins/UM3NetworkPrinting/PrintWindow.qml b/plugins/UM3NetworkPrinting/PrintWindow.qml index 5b011d98c4..0553db0eb2 100644 --- a/plugins/UM3NetworkPrinting/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/PrintWindow.qml @@ -90,6 +90,7 @@ UM.Dialog onClicked: { base.visible = false; printerSelectionCombobox.currentIndex = 0 + OutputDevice.cancelPrintSelection() } } ]