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.
This commit is contained in:
Ghostkeeper 2016-07-01 14:38:51 +02:00
parent e1db3e5316
commit d1188899a7

View file

@ -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")