diff options
author | Kostas Karmas <konskarm@gmail.com> | 2020-05-04 14:00:17 +0300 |
---|---|---|
committer | Kostas Karmas <konskarm@gmail.com> | 2020-05-04 14:00:17 +0300 |
commit | 524a072420bcaf750772b758f169beb84fea33ea (patch) | |
tree | 0c352239c697cf031ae4aa8d6f49dbcf54d3fb71 /plugins/VersionUpgrade | |
parent | c29ebc8a77c0aa83eeec634d2b9cc9dd248b2da1 (diff) |
Merge version upgrade 45to46 with 46to47
CURA-7421
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py | 13 | ||||
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade45to46/__init__.py | 14 |
2 files changed, 17 insertions, 10 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py b/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py index 2234dd35f5..6bece16b03 100644 --- a/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py +++ b/plugins/VersionUpgrade/VersionUpgrade45to46/VersionUpgrade45to46.py @@ -32,7 +32,7 @@ class VersionUpgrade45to46(VersionUpgrade): parser.read_string(serialized) # Update version number. - parser["metadata"]["setting_version"] = "12" + parser["metadata"]["setting_version"] = "13" # Remove deleted settings from the visible settings list. visible_settings = set(parser["general"]["visible_settings"].split(";")) @@ -59,13 +59,20 @@ class VersionUpgrade45to46(VersionUpgrade): parser.read_string(serialized) # Update version number. - parser["metadata"]["setting_version"] = "12" + parser["metadata"]["setting_version"] = "13" if "values" in parser: for removed in _removed_settings: if removed in parser["values"]: del parser["values"][removed] + if "meshfix_maximum_deviation" in parser["values"]: + maximum_deviation = parser["values"]["meshfix_maximum_deviation"] + if maximum_deviation.startswith("="): + maximum_deviation = maximum_deviation[1:] + maximum_deviation = "=(" + maximum_deviation + ") / 2" + parser["values"]["meshfix_maximum_deviation"] = maximum_deviation + result = io.StringIO() parser.write(result) return [filename], [result.getvalue()] @@ -84,7 +91,7 @@ class VersionUpgrade45to46(VersionUpgrade): # Update version number. if "metadata" not in parser: parser["metadata"] = {} - parser["metadata"]["setting_version"] = "12" + parser["metadata"]["setting_version"] = "13" result = io.StringIO() parser.write(result) diff --git a/plugins/VersionUpgrade/VersionUpgrade45to46/__init__.py b/plugins/VersionUpgrade/VersionUpgrade45to46/__init__.py index e44a02f704..090f8a109c 100644 --- a/plugins/VersionUpgrade/VersionUpgrade45to46/__init__.py +++ b/plugins/VersionUpgrade/VersionUpgrade45to46/__init__.py @@ -14,13 +14,13 @@ def getMetaData() -> Dict[str, Any]: return { "version_upgrade": { # From To Upgrade function - ("preferences", 6000011): ("preferences", 6000012, upgrade.upgradePreferences), - ("machine_stack", 4000011): ("machine_stack", 4000012, upgrade.upgradeStack), - ("extruder_train", 4000011): ("extruder_train", 4000012, upgrade.upgradeStack), - ("definition_changes", 4000011): ("definition_changes", 4000012, upgrade.upgradeInstanceContainer), - ("quality_changes", 4000011): ("quality_changes", 4000012, upgrade.upgradeInstanceContainer), - ("quality", 4000011): ("quality", 4000012, upgrade.upgradeInstanceContainer), - ("user", 4000011): ("user", 4000012, upgrade.upgradeInstanceContainer), + ("preferences", 6000011): ("preferences", 6000013, upgrade.upgradePreferences), + ("machine_stack", 4000011): ("machine_stack", 4000013, upgrade.upgradeStack), + ("extruder_train", 4000011): ("extruder_train", 4000013, upgrade.upgradeStack), + ("definition_changes", 4000011): ("definition_changes", 4000013, upgrade.upgradeInstanceContainer), + ("quality_changes", 4000011): ("quality_changes", 4000013, upgrade.upgradeInstanceContainer), + ("quality", 4000011): ("quality", 4000013, upgrade.upgradeInstanceContainer), + ("user", 4000011): ("user", 4000013, upgrade.upgradeInstanceContainer), }, "sources": { "preferences": { |