From 081b0b23a41711ab91c8b1f8b10354e80d82764c Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 6 Apr 2021 11:38:28 +0200 Subject: [PATCH] Fix setting the time_remaining_method in the versionUpgrader The DisplayProgressOnLCD script was changed and the "time_remaining" was split into two settings: the "time_remaining" and the "time_remaining_method". If the "time_remaining" was enabled, the "time_remaining_method" should be set to "m117". The VersionUpgrader48to49 was changing the "time_remaining" to "m117" instead of changing the "time_remaining_method", which was leading to the "time_remaining" having a wrong value and not being interpreted as a boolean. This commit fixes that by setting the "time_remaining_method" into "m117" when the "time_remaining" was True. CURA-8110 --- .../VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py index 0ded1a064b..789830ef08 100644 --- a/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py +++ b/plugins/VersionUpgrade/VersionUpgrade48to49/VersionUpgrade48to49.py @@ -68,7 +68,7 @@ class VersionUpgrade48to49(VersionUpgrade): # Update Display Progress on LCD parameters. script_id = script_parser.sections()[0] if script_id == "DisplayProgressOnLCD": - script_parser[script_id]["time_remaining"] = "m117" if script_parser[script_id]["time_remaining"] == "True" else "none" + script_parser[script_id]["time_remaining_method"] = "m117" if script_parser[script_id]["time_remaining"] == "True" else "none" script_io = io.StringIO() script_parser.write(script_io)