From bd361e500c9b4dac5608ff03b3cdb8e8b0dfc9c0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 19 May 2017 12:30:00 +0200 Subject: [PATCH] Don't keep a copy of currently connected printer This QML file was holding a copy of the currently connected printer, stored in connectingToPrinter. This copy got out of sync when you load a project file which had a different connected printer. Instead, ask the manager for the currently connected printer key every time you click the button. Contributes to issue CURA-3839. --- plugins/UM3NetworkPrinting/DiscoverUM3Action.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml index 27271f0d15..f9af47fc7a 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml @@ -12,7 +12,6 @@ Cura.MachineAction anchors.fill: parent; property var selectedPrinter: null property bool completeProperties: true - property var connectingToPrinter: null Connections { @@ -33,9 +32,8 @@ Cura.MachineAction if(base.selectedPrinter && base.completeProperties) { var printerKey = base.selectedPrinter.getKey() - if(connectingToPrinter != printerKey) { - // prevent an infinite loop - connectingToPrinter = printerKey; + if(manager.getStoredKey() != printerKey) + { manager.setKey(printerKey); completed(); }