mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-14 05:01:47 +08:00
Added hack so the new extruders are added to extruder manager
CURA-1263
This commit is contained in:
parent
c919883178
commit
b8746aee30
@ -10,6 +10,9 @@ from UM.Settings.ContainerRegistry import ContainerRegistry
|
|||||||
|
|
||||||
from UM.Preferences import Preferences
|
from UM.Preferences import Preferences
|
||||||
from .WorkspaceDialog import WorkspaceDialog
|
from .WorkspaceDialog import WorkspaceDialog
|
||||||
|
|
||||||
|
from cura.Settings.ExtruderManager import ExtruderManager
|
||||||
|
|
||||||
import zipfile
|
import zipfile
|
||||||
import io
|
import io
|
||||||
|
|
||||||
@ -249,6 +252,12 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
quality_changes_index = stack.getContainerIndex(old_container)
|
quality_changes_index = stack.getContainerIndex(old_container)
|
||||||
stack.replaceContainer(quality_changes_index, container)
|
stack.replaceContainer(quality_changes_index, container)
|
||||||
|
|
||||||
|
for stack in extruder_stacks:
|
||||||
|
if global_stack.getId() not in ExtruderManager.getInstance()._extruder_trains:
|
||||||
|
ExtruderManager.getInstance()._extruder_trains[global_stack.getId()] = {}
|
||||||
|
#TODO: This is nasty hack; this should be made way more robust (setter?)
|
||||||
|
ExtruderManager.getInstance()._extruder_trains[global_stack.getId()][stack.getMetaDataEntry("position")] = stack
|
||||||
|
|
||||||
Logger.log("d", "Workspace loading is notifying rest of the code of changes...")
|
Logger.log("d", "Workspace loading is notifying rest of the code of changes...")
|
||||||
# Notify everything/one that is to notify about changes.
|
# Notify everything/one that is to notify about changes.
|
||||||
for container in global_stack.getContainers():
|
for container in global_stack.getContainers():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user