From d1188899a7d4de87ad7bede251a22194be97d44e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 1 Jul 2016 14:38:51 +0200 Subject: [PATCH] Translate active machine setting It was in machines/active_instance. Now it's in cura/active_machine. The setting value remains the same. Contributes to issue CURA-844. --- plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py index 961f4f963e..18391880e0 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Preferences.py @@ -57,6 +57,12 @@ class Preferences: visible_settings = ",".join(visible_settings) self._config.set("machines", "setting_visibility", value = visible_settings) + #Translate the active_instance key. + if self._config.has_section("machines") and self._config.has_option("machines", "active_instance"): + active_machine = self._config.get("machines", "active_instance") + self._config.remove_option("machines", "active_instance") + self._config.set("cura", "active_machine", active_machine) + #Update the version number itself. self._config.set("general", "version", value = "3")