mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 06:09:38 +08:00
Add version upgrade for infill_hollow -> infill_support
The functionality is more or less the same, so in an attempt to keep people's profiles as similar as possible we translate this setting to the newer implementation.
This commit is contained in:
parent
ab2503834b
commit
db16a6275f
@ -6,6 +6,9 @@ import io #To serialise the preference files afterwards.
|
||||
|
||||
from UM.VersionUpgrade import VersionUpgrade #We're inheriting from this.
|
||||
|
||||
_renamed_settings = {
|
||||
"infill_hollow": "infill_support_enabled"
|
||||
}
|
||||
|
||||
## Upgrades configurations from the state they were in at version 3.3 to the
|
||||
# state they should be in at version 3.4.
|
||||
@ -38,6 +41,13 @@ class VersionUpgrade33to34(VersionUpgrade):
|
||||
# Update version number.
|
||||
parser["general"]["version"] = "4"
|
||||
|
||||
#Renamed settings.
|
||||
if "values" in parser:
|
||||
for original, replacement in _renamed_settings.items():
|
||||
if original in parser["value"]:
|
||||
parser["value"][replacement] = parser["value"][original]
|
||||
del parser["value"][original]
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
return [filename], [result.getvalue()]
|
Loading…
x
Reference in New Issue
Block a user