mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Fix code-style
This commit is contained in:
parent
e983a9a9e7
commit
762a1b1bfd
13 changed files with 47 additions and 33 deletions
|
@ -244,8 +244,9 @@ class CuraContainerStack(ContainerStack):
|
|||
#
|
||||
# \throws InvalidContainerStackError Raised when no definition can be found for the stack.
|
||||
@override(ContainerStack)
|
||||
def deserialize(self, contents: str, file_name: Optional[str] = None) -> None:
|
||||
super().deserialize(contents, file_name)
|
||||
def deserialize(self, serialized: str, file_name: Optional[str] = None) -> str:
|
||||
# update the serialized data first
|
||||
serialized = super().deserialize(serialized, file_name)
|
||||
|
||||
new_containers = self._containers.copy()
|
||||
while len(new_containers) < len(_ContainerIndexes.IndexTypeMap):
|
||||
|
@ -253,10 +254,11 @@ class CuraContainerStack(ContainerStack):
|
|||
|
||||
# Validate and ensure the list of containers matches with what we expect
|
||||
for index, type_name in _ContainerIndexes.IndexTypeMap.items():
|
||||
container = None
|
||||
try:
|
||||
container = new_containers[index]
|
||||
except IndexError:
|
||||
container = None
|
||||
pass
|
||||
|
||||
if type_name == "definition":
|
||||
if not container or not isinstance(container, DefinitionContainer):
|
||||
|
@ -283,6 +285,9 @@ class CuraContainerStack(ContainerStack):
|
|||
from cura.Settings.CuraStackBuilder import CuraStackBuilder
|
||||
CuraStackBuilder.createDefinitionChangesContainer(self, self.getId() + "_settings")
|
||||
|
||||
## TODO; Deserialize the containers.
|
||||
return serialized
|
||||
|
||||
## protected:
|
||||
|
||||
# Helper to make sure we emit a PyQt signal on container changes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue