mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Simplify some checks for connection types and group size
This commit is contained in:
parent
2f92f6ef50
commit
af2061cd52
3 changed files with 31 additions and 18 deletions
|
@ -527,10 +527,15 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasRemoteConnection(self) -> bool:
|
||||
if self._global_container_stack:
|
||||
connection_type = self._global_container_stack.getMetaDataEntry("connection_type")
|
||||
return connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]
|
||||
return False
|
||||
return self.activeMachineHasActiveNetworkConnection or self.activeMachineHasActiveCloudConnection
|
||||
# if self._global_container_stack:
|
||||
# connection_type = self._global_container_stack.getMetaDataEntry("connection_type")
|
||||
# return connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]
|
||||
# return False
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsGroup(self) -> bool:
|
||||
return self._printer_output_devices and self._printer_output_devices[0].clusterSize > 1
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasActiveNetworkConnection(self) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue