From dd5981d85e4b9ac3580c6164e731fc76fcc5ce6b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 31 Aug 2022 10:09:47 +0200 Subject: [PATCH] Only remove abstract output device if it's actually added CURA-8463 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index a905cc8791..1105a8b356 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -404,7 +404,7 @@ class CloudOutputDeviceManager: for device in remote_abstract_cluster_copy: if device.printerType == active_machine.definition.getId(): self._connectToAbstractOutputDevice(device, active_machine) - else: + elif device.key in output_device_manager.getOutputDeviceIds(): output_device_manager.removeOutputDevice(device.key) def _setOutputDeviceMetadata(self, device: CloudOutputDevice, machine: GlobalStack): @@ -423,6 +423,7 @@ class CloudOutputDeviceManager: machine.addConfiguredConnectionType(device.connectionType.value) def _connectToAbstractOutputDevice(self, device: AbstractCloudOutputDevice, machine: GlobalStack) -> None: + Logger.debug(f"Attempting to connect to abstract machine {machine.id}") if not device.isConnected(): device.connect() machine.addConfiguredConnectionType(device.connectionType.value)