mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Add a function to add a MachineNode to the tree.
This solves the issue that machines created by the stack builder broke the material updating CURA-6791
This commit is contained in:
parent
5b5256b9e4
commit
7e3f265068
2 changed files with 16 additions and 12 deletions
|
@ -40,8 +40,7 @@ class CuraStackBuilder:
|
|||
# The container tree listens to the containerAdded signal to add the definition and build the tree,
|
||||
# but that signal is emitted with a delay which might not have passed yet.
|
||||
# Therefore we must make sure that it's manually added here.
|
||||
if machine_definition.getId() not in container_tree.machines:
|
||||
container_tree.machines[machine_definition.getId()] = MachineNode(machine_definition.getId())
|
||||
container_tree.addMachineNodeByDefinitionId(machine_definition.getId())
|
||||
machine_node = container_tree.machines[machine_definition.getId()]
|
||||
|
||||
generated_name = registry.createUniqueName("machine", "", name, machine_definition.getName())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue