diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index cd8ca09447..669a5a7cf7 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -530,6 +530,15 @@ class MachineManager(QObject): return connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value] return False + @pyqtProperty(bool, notify = printerConnectedStatusChanged) + def activeMachineHasCloudConnection(self) -> bool: + if not self.activeMachineHasRemoteConnection: + return False + output_device = next(iter(self.printerOutputDevices), None) # type: PrinterOutputDevice + if not output_device: + return False + return output_device.connectionType == ConnectionType.CloudConnection + def activeMachineNetworkKey(self) -> str: if self._global_container_stack: return self._global_container_stack.getMetaDataEntry("um_network_key", "") diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 13ebae4ac5..bb8934f620 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -13,7 +13,7 @@ Cura.ExpandablePopup property var outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasRemoteConnection - property bool isCloudPrinter: machineSelector.outputDevice.connectionType == Cura.PrinterOutputDevice.CloudConnection + property bool isCloudPrinter: Cura.MachineManager.activeMachineHasCloudConnection property bool isPrinterConnected: Cura.MachineManager.printerConnected contentPadding: UM.Theme.getSize("default_lining").width