mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 15:45:56 +08:00
Fix typing
CURA-6179
This commit is contained in:
parent
21c6bba1ce
commit
17fdc86e50
@ -415,8 +415,10 @@ class MachineManager(QObject):
|
|||||||
definitions = CuraContainerRegistry.getInstance().findDefinitionContainers(id = definition_id)
|
definitions = CuraContainerRegistry.getInstance().findDefinitionContainers(id = definition_id)
|
||||||
if definitions:
|
if definitions:
|
||||||
name = definitions[0].getName()
|
name = definitions[0].getName()
|
||||||
|
else:
|
||||||
|
name = definition_id
|
||||||
|
|
||||||
new_stack = CuraStackBuilder.createMachine(name, definition_id)
|
new_stack = CuraStackBuilder.createMachine(cast(str, name), definition_id)
|
||||||
if new_stack:
|
if new_stack:
|
||||||
# Instead of setting the global container stack here, we set the active machine and so the signals are emitted
|
# Instead of setting the global container stack here, we set the active machine and so the signals are emitted
|
||||||
self.setActiveMachine(new_stack.getId())
|
self.setActiveMachine(new_stack.getId())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user