diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index ae74d76734..aacdfb0952 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -541,14 +541,18 @@ class MachineManager(QObject): return bool(self._printer_output_devices) and len(self._printer_output_devices[0].printers) > 1 @pyqtProperty(bool, notify = printerConnectedStatusChanged) - def activeMachineHasActiveNetworkConnection(self) -> bool: + def activeMachineHasNetworkConnection(self) -> bool: # A network connection is only available if any output device is actually a network connected device. return any(d.connectionType == ConnectionType.NetworkConnection for d in self._printer_output_devices) @pyqtProperty(bool, notify = printerConnectedStatusChanged) - def activeMachineHasActiveCloudConnection(self) -> bool: + def activeMachineHasCloudConnection(self) -> bool: # A cloud connection is only available if any output device actually is a cloud connected device. return any(d.connectionType == ConnectionType.CloudConnection for d in self._printer_output_devices) + + @pyqtProperty(bool, notify = printerConnectedStatusChanged) + def activeMachineIsUsingCloudConnection(self) -> bool: + return self.activeMachineHasCloudConnection and not self.activeMachineHasNetworkConnection def activeMachineNetworkKey(self) -> str: if self._global_container_stack: diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml index c7588b83bc..701be69d67 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml @@ -24,7 +24,7 @@ Item // If the printer is a cloud printer or not. Other items base their enabled state off of this boolean. In the future // they might not need to though. - property bool cloudConnection: Cura.MachineManager.activeMachineHasActiveCloudConnection + property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection width: parent.width height: childrenRect.height diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 0e541c484d..8c63e1ef1a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -30,7 +30,7 @@ Item // If the printer is a cloud printer or not. Other items base their enabled state off of this boolean. In the future // they might not need to though. - property bool cloudConnection: Cura.MachineManager.activeMachineHasActiveCloudConnection + property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection width: 834 * screenScaleFactor // TODO: Theme! height: childrenRect.height diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index cd5e041606..e9452f4d35 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -11,8 +11,8 @@ Cura.ExpandablePopup { id: machineSelector - property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasActiveNetworkConnection - property bool isCloudPrinter: Cura.MachineManager.activeMachineHasActiveCloudConnection + property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasNetworkConnection + property bool isCloudPrinter: Cura.MachineManager.activeMachineHasCloudConnection property bool isGroup: Cura.MachineManager.activeMachineIsGroup contentPadding: UM.Theme.getSize("default_lining").width