mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Store the printer cluster size as a metadata entry on the machine
This makes the cluster size also available when the machine is offline. Also fixes an issue where the cluster size is improperly restored once the internet connection comes back online, resulting in the printer showing as a single printer until next sync CURA-7347
This commit is contained in:
parent
ba705176fe
commit
80a5b53aad
4 changed files with 10 additions and 3 deletions
|
@ -488,7 +488,11 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsGroup(self) -> bool:
|
||||
return bool(self._printer_output_devices) and len(self._printer_output_devices[0].printers) > 1
|
||||
if self.activeMachine is None:
|
||||
return False
|
||||
|
||||
group_size = int(self.activeMachine.getMetaDataEntry("group_size", "-1"))
|
||||
return group_size > 1
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasNetworkConnection(self) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue