Add extruder stack only when it's completely built

Probably better for concurrency reasons, though that is not a problem yet at this moment.

Contributes to issues CURA-1278 and CURA-351.
This commit is contained in:
Ghostkeeper 2016-06-06 10:22:47 +02:00
parent bfc880b61a
commit 79c37d667e

View File

@ -27,7 +27,6 @@ class Extruder:
#Create a container stack for this extruder. #Create a container stack for this extruder.
self._name = self._uniqueName(self._definition) self._name = self._uniqueName(self._definition)
self._container_stack = UM.Settings.ContainerStack(self._name) self._container_stack = UM.Settings.ContainerStack(self._name)
container_registry.addContainer(self._container_stack)
self._container_stack.addMetaDataEntry("type", "extruder_train") self._container_stack.addMetaDataEntry("type", "extruder_train")
self._container_stack.addContainer(self._definition) self._container_stack.addContainer(self._definition)
@ -81,6 +80,8 @@ class Extruder:
self._container_stack.setNextStack(UM.Application.getInstance().getGlobalContainerStack()) self._container_stack.setNextStack(UM.Application.getInstance().getGlobalContainerStack())
container_registry.addContainer(self._container_stack)
definition_changed = UM.Signal() definition_changed = UM.Signal()
material_changed = UM.Signal() material_changed = UM.Signal()
name_changed = UM.Signal() name_changed = UM.Signal()