Fix creating abstract machines on account sync

Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
This commit is contained in:
c.lamboo 2022-08-19 14:44:19 +02:00
parent b82f1f4a8c
commit 761bf3b8fa
2 changed files with 3 additions and 3 deletions

View file

@ -6,8 +6,8 @@ from cura.Settings.GlobalStack import GlobalStack
class AbstractMachine(GlobalStack): class AbstractMachine(GlobalStack):
""" Behaves as a type of machine, represents multiple machines of the same type """ """ Behaves as a type of machine, represents multiple machines of the same type """
def __init__(self): def __init__(self, container_id: str):
super(self) super().__init__(container_id)
self.setMetaDataEntry("type", "abstract_machine") self.setMetaDataEntry("type", "abstract_machine")
def getMachinesOfType(self) -> List[GlobalStack]: def getMachinesOfType(self) -> List[GlobalStack]:

View file

@ -405,7 +405,7 @@ class CloudOutputDeviceManager:
self._setOutputDeviceMetadata(device, new_machine) self._setOutputDeviceMetadata(device, new_machine)
CuraStackBuilder.createAbstractMachine(new_machine) CuraStackBuilder.createAbstractMachine(device.name, device.printerType)
if activate: if activate:
CuraApplication.getInstance().getMachineManager().setActiveMachine(new_machine.getId()) CuraApplication.getInstance().getMachineManager().setActiveMachine(new_machine.getId())