From 3040a7c83071f460bafc5da201a3e0f0156b9aba Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 31 Aug 2022 18:11:24 +0200 Subject: [PATCH] Always check if an abstract machine needs to be added CURA-9289 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 4082431cd9..bdae34a860 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -194,6 +194,9 @@ class CloudOutputDeviceManager: if cluster_data.printer_type not in self._abstract_clusters: self._abstract_clusters[cluster_data.printer_type] = AbstractCloudOutputDevice(self._api, cluster_data.printer_type) + # Ensure that the abstract machine is added (either because it was never added, or it somehow got + # removed) + _abstract_machine = CuraStackBuilder.createAbstractMachine(cluster_data.printer_type) # If the machine already existed before, it will be present in the host_guid_map if cluster_data.host_guid in host_guid_map: @@ -365,8 +368,6 @@ class CloudOutputDeviceManager: self._setOutputDeviceMetadata(device, new_machine) - _abstract_machine = CuraStackBuilder.createAbstractMachine(device.printerType) - if activate: CuraApplication.getInstance().getMachineManager().setActiveMachine(new_machine.getId())