mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Pass optional file_name for deserialization
CURA-4613 Some upgrades depend on the file_name, so the file_name is needed in this case.
This commit is contained in:
parent
1b76d08f01
commit
18c7a5acf3
4 changed files with 31 additions and 21 deletions
|
@ -92,8 +92,8 @@ class ExtruderStack(CuraContainerStack):
|
|||
return self.getNextStack()._getMachineDefinition()
|
||||
|
||||
@override(CuraContainerStack)
|
||||
def deserialize(self, contents: str) -> None:
|
||||
super().deserialize(contents)
|
||||
def deserialize(self, contents: str, file_name: Optional[str] = None) -> None:
|
||||
super().deserialize(contents, file_name)
|
||||
stacks = ContainerRegistry.getInstance().findContainerStacks(id=self.getMetaDataEntry("machine", ""))
|
||||
if stacks:
|
||||
self.setNextStack(stacks[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue