mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -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
|
@ -422,11 +422,11 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
return version * 1000000 + setting_version
|
||||
|
||||
## Overridden from InstanceContainer
|
||||
def deserialize(self, serialized):
|
||||
def deserialize(self, serialized, file_name = None):
|
||||
containers_to_add = []
|
||||
# update the serialized data first
|
||||
from UM.Settings.Interfaces import ContainerInterface
|
||||
serialized = ContainerInterface.deserialize(self, serialized)
|
||||
serialized = ContainerInterface.deserialize(self, serialized, file_name)
|
||||
|
||||
try:
|
||||
data = ET.fromstring(serialized)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue