mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Merge branch 'master' into feature_sync_button
This commit is contained in:
commit
b212781a19
9 changed files with 396 additions and 25 deletions
|
@ -352,6 +352,14 @@ class MachineManager(QObject):
|
|||
|
||||
self.__emitChangedSignals()
|
||||
|
||||
@staticmethod
|
||||
def getMachine(definition_id: str) -> Optional["GlobalStack"]:
|
||||
machines = ContainerRegistry.getInstance().findContainerStacks(type = "machine")
|
||||
for machine in machines:
|
||||
if machine.definition.getId() == definition_id:
|
||||
return machine
|
||||
return None
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def addMachine(self, name: str, definition_id: str) -> None:
|
||||
new_stack = CuraStackBuilder.createMachine(name, definition_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue