diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2020-07-15 12:57:34 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2020-07-15 12:57:34 +0300 |
commit | bc51db321f9d6c0552d944273d06d56b1f0df2b1 (patch) | |
tree | 751a55841f16527f86d2e7127a193bcd60e21ebe /plugins/VersionUpgrade | |
parent | 617b07061dcaa0d624fc7066f2f3f19004a55f50 (diff) | |
parent | 3ceb9da27c6c664207bef05e44f1879befd3cf09 (diff) |
Merge branch 'master' into CURA-6711_support_structure_dropdown
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py index 23352bf4e2..cb2e17dae5 100644 --- a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py +++ b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py @@ -45,13 +45,6 @@ class VersionUpgrade462to47(VersionUpgrade): parser["general"]["visible_settings"] = ";".join( set(parser["general"]["visible_settings"].split(";")).difference(_removed_settings)) - if "cura" in parser and "jobname_prefix" in parser["cura"]: - if not parseBool(parser["cura"]["jobname_prefix"]): - parser["cura"]["job_name_template"] = "{project_name}" - del parser["cura"]["jobname_prefix"] - # else: When the jobname_prefix preference is True or not set, - # the default value for job_name_template ("{machine_name_short}_{project_name}") will be used - result = io.StringIO() parser.write(result) return [filename], [result.getvalue()] @@ -168,6 +161,17 @@ class VersionUpgrade462to47(VersionUpgrade): if "redo_layers" in script_parser["PauseAtHeight"]: script_parser["PauseAtHeight"]["redo_layer"] = str(int(script_parser["PauseAtHeight"]["redo_layers"]) > 0) del script_parser["PauseAtHeight"]["redo_layers"] # Has been renamed to without the S. + + # Migrate DisplayCompleteOnLCD to DisplayProgressOnLCD + if script_id == "DisplayRemainingTimeOnLCD": + was_enabled = parseBool(script_parser[script_id]["TurnOn"]) if "TurnOn" in script_parser[script_id] else False + script_parser.remove_section(script_id) + + script_id = "DisplayProgressOnLCD" + script_parser.add_section(script_id) + if was_enabled: + script_parser.set(script_id, "time_remaining", "True") + script_io = io.StringIO() script_parser.write(script_io) script_str = script_io.getvalue() |