Merge branch 'main' of github.com:Ultimaker/Cura into CURA-8463_cloud_configuration

This commit is contained in:
Jaime van Kessel 2022-08-31 10:39:05 +02:00
commit 4c55befad7
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4
237 changed files with 130 additions and 251 deletions

View file

@ -531,6 +531,10 @@ class MachineManager(QObject):
def printerConnected(self) -> bool:
return bool(self._printer_output_devices)
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineIsAbstract(self) -> bool:
return (self.activeMachine is not None) and parseBool(self.activeMachine.getMetaDataEntry("is_abstract_machine", False))
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineIsGroup(self) -> bool:
if self.activeMachine is None:
@ -555,6 +559,8 @@ class MachineManager(QObject):
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineHasCloudRegistration(self) -> bool:
if self.activeMachineIsAbstract:
return any(m.getMetaDataEntry("is_online", False) for m in self.getMachinesWithDefinition(self.activeMachine.definition.getId(), True))
return self.activeMachine is not None and ConnectionType.CloudConnection in self.activeMachine.configuredConnectionTypes
@pyqtProperty(bool, notify = printerConnectedStatusChanged)