mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Merge branch 'master' into CURA-7454_Add_remove_printers_button_in_removed_printers_from_account_message
This commit is contained in:
commit
984426fabb
8 changed files with 28 additions and 5 deletions
|
@ -496,7 +496,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 activeMachineIsLinkedToCurrentAccount(self) -> bool:
|
||||
|
@ -734,6 +738,8 @@ class MachineManager(QObject):
|
|||
containers = CuraContainerRegistry.getInstance().findInstanceContainersMetadata(type = "user", machine = machine_id)
|
||||
for container in containers:
|
||||
CuraContainerRegistry.getInstance().removeContainer(container["id"])
|
||||
machine_stack = CuraContainerRegistry.getInstance().findContainerStacks(type = "machine", name = machine_id)[0]
|
||||
CuraContainerRegistry.getInstance().removeContainer(machine_stack.definitionChanges.getId())
|
||||
CuraContainerRegistry.getInstance().removeContainer(machine_id)
|
||||
|
||||
# If the printer that is being removed is a network printer, the hidden printers have to be also removed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue