From ba53b0109bcbdb1eba7f7857a8f4af7ceea96f04 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 21 Sep 2016 14:00:11 +0200 Subject: [PATCH 1/2] Fix connecting to the selected printer when pressing "Finish" in add machine wizard --- DiscoverUM3Action.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscoverUM3Action.qml b/DiscoverUM3Action.qml index c98bb13334..8b20066ab2 100644 --- a/DiscoverUM3Action.qml +++ b/DiscoverUM3Action.qml @@ -20,7 +20,7 @@ Cura.MachineAction onNextClicked: { // Connect to the printer if the MachineAction is currently shown - if(base.parent == dialog) + if(base.parent.wizard == dialog) { connectToPrinter(); } From d8f0b634aff9a600b7678219b6eb3b91c709e0bf Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 21 Sep 2016 14:01:05 +0200 Subject: [PATCH 2/2] Switch back to Print Setup when canceling sending a print to the printer CURA-2384 --- NetworkPrinterOutputDevice.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index cb8ddde82e..e213684d56 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -587,13 +587,14 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): return user return "Unknown User" # Couldn't find out username. - def _progressMessageActionTrigger(self, message_id = None, action_id="abort"): - if action_id == "abort": + def _progressMessageActionTrigger(self, message_id = None, action_id = None): + if action_id == "Abort": Logger.log("d", "User aborted sending print to remote.") self._progress_message.hide() self._compressing_print = False if self._post_reply: self._post_reply.abort() + Application.getInstance().showPrintMonitor.emit(False) ## Attempt to start a new print. # This function can fail to actually start a print due to not being authenticated or another print already @@ -602,7 +603,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): try: self._send_gcode_start = time() self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), 0, False, -1) - self._progress_message.addAction("abort", i18n_catalog.i18nc("@action:button", "Cancel"), None, "") + self._progress_message.addAction("Abort", i18n_catalog.i18nc("@action:button", "Cancel"), None, "") self._progress_message.actionTriggered.connect(self._progressMessageActionTrigger) self._progress_message.show() Logger.log("d", "Started sending g-code to remote printer.")