Remove all dependencies of the CuraContainerStack with the

ContainerRegistry.

That will be very helpful for creating unit tests. Also this is not
needed because the next stack is always set in the machine or extruder
manager when switching printers.

Contributes to CURA-5628.
This commit is contained in:
Diego Prado Gesto 2018-08-14 15:33:35 +02:00
parent ce9782b3af
commit e1fd9b03a4

View file

@ -139,9 +139,6 @@ class ExtruderStack(CuraContainerStack):
super().deserialize(contents, file_name)
if "enabled" not in self.getMetaData():
self.setMetaDataEntry("enabled", "True")
stacks = ContainerRegistry.getInstance().findContainerStacks(id=self.getMetaDataEntry("machine", ""))
if stacks:
self.setNextStack(stacks[0])
def _onPropertiesChanged(self, key: str, properties: Dict[str, Any]) -> None:
# When there is a setting that is not settable per extruder that depends on a value from a setting that is,