From b3d652839d66a405b43a465e7193ebe860eafaf1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 29 Mar 2018 12:00:26 +0200 Subject: [PATCH] Rename quality type from 'low' to 'fast' Not only the profile name was changed, but also the quality type. See commit 1538486e852e9208a1a447c87a23f9a88e33ff52. Contributes to issue CURA-5177. --- .../VersionUpgrade32to33/VersionUpgrade32to33.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py b/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py index 5fbdbee7e3..9840c91bd0 100644 --- a/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py +++ b/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py @@ -58,6 +58,10 @@ _RENAMED_QUALITY_PROFILES = { "um2_low": "um2_fast" } +_RENAMED_QUALITY_TYPES = { + "low": "fast" +} + ## Upgrades configurations from the state they were in at version 3.2 to the # state they should be in at version 3.3. class VersionUpgrade32to33(VersionUpgrade): @@ -137,7 +141,10 @@ class VersionUpgrade32to33(VersionUpgrade): del parser["metadata"]["extruder"] quality_type = parser["metadata"]["quality_type"] - parser["metadata"]["quality_type"] = quality_type.lower() + quality_type = quality_type.lower() + if quality_type in _RENAMED_QUALITY_TYPES: + quality_type = _RENAMED_QUALITY_TYPES[quality_type] + parser["metadata"]["quality_type"] = quality_type #Update version number. parser["general"]["version"] = "3"