mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Replaced hack for setting extruders with more robust setter
CURA-1263
This commit is contained in:
parent
b175e6876f
commit
053f0ca031
3 changed files with 17 additions and 5 deletions
|
@ -301,11 +301,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
quality_changes_index = stack.getContainerIndex(old_container)
|
||||
stack.replaceContainer(quality_changes_index, container)
|
||||
|
||||
# TODO: This is nasty hack; this should be made way more robust (setter?)
|
||||
if global_stack.getId() not in ExtruderManager.getInstance()._extruder_trains:
|
||||
ExtruderManager.getInstance()._extruder_trains[global_stack.getId()] = {}
|
||||
for stack in extruder_stacks:
|
||||
ExtruderManager.getInstance()._extruder_trains[global_stack.getId()][stack.getMetaDataEntry("position")] = stack
|
||||
ExtruderManager.getInstance().registerExtruder(stack, global_stack.getId())
|
||||
else:
|
||||
# Machine has no extruders, but it needs to be registered with the extruder manager.
|
||||
ExtruderManager.getInstance().registerExtruder(None, global_stack.getId())
|
||||
|
||||
Logger.log("d", "Workspace loading is notifying rest of the code of changes...")
|
||||
# Notify everything/one that is to notify about changes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue