mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge branch 'master' into feature_enable_disable_extruder
This commit is contained in:
commit
3b8d470323
9 changed files with 396 additions and 25 deletions
|
@ -310,6 +310,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