mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Run upgrader on imported profiles from >2.1
Oops... It should upgrade the old profiles so that they have the correct version and setting version.
This commit is contained in:
parent
7fbdccffdb
commit
0498d43834
1 changed files with 6 additions and 3 deletions
|
@ -35,7 +35,10 @@ class CuraProfileReader(ProfileReader):
|
||||||
for profile_id in archive.namelist():
|
for profile_id in archive.namelist():
|
||||||
with archive.open(profile_id) as f:
|
with archive.open(profile_id) as f:
|
||||||
serialized = f.read()
|
serialized = f.read()
|
||||||
profile = self._loadProfile(serialized.decode("utf-8"), profile_id)
|
upgraded_profiles = self._upgradeProfile(serialized.decode("utf-8"), profile_id) #After upgrading it may split into multiple profiles.
|
||||||
|
for upgraded_profile in upgraded_profiles:
|
||||||
|
serialization, new_id = upgraded_profile
|
||||||
|
profile = self._loadProfile(serialization, new_id)
|
||||||
if profile is not None:
|
if profile is not None:
|
||||||
results.append(profile)
|
results.append(profile)
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue