Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-06-18 12:59:33 +0300
committerGhostkeeper <rubend@tutanota.com>2019-06-18 13:00:23 +0300
commit77d396b9bdbfe52f70548b26adcc18038ff6115d (patch)
treed475d3447e954a2196398c8272337c298436fb79 /plugins/CuraProfileReader
parent0498d438343f29d24a05dbae46f4624e9692c9ae (diff)
Also upgrade profiles if only the setting version is incorrect
We need to check both version numbers.
Diffstat (limited to 'plugins/CuraProfileReader')
-rw-r--r--plugins/CuraProfileReader/CuraProfileReader.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py
index e9fc3e1adb..eae672c11e 100644
--- a/plugins/CuraProfileReader/CuraProfileReader.py
+++ b/plugins/CuraProfileReader/CuraProfileReader.py
@@ -8,6 +8,7 @@ from UM.PluginRegistry import PluginRegistry
from UM.Logger import Logger
from UM.Settings.ContainerFormatError import ContainerFormatError
from UM.Settings.InstanceContainer import InstanceContainer # The new profile to make.
+from cura.CuraApplication import CuraApplication #To get the current setting version.
from cura.ReaderWriters.ProfileReader import ProfileReader
import zipfile
@@ -67,7 +68,7 @@ class CuraProfileReader(ProfileReader):
return []
version = int(parser["general"]["version"])
- if InstanceContainer.Version != version:
+ if InstanceContainer.Version != version or "metadata" not in parser or "setting_version" not in parser["metadata"] or parser["metadata"]["setting_version"] != str(CuraApplication.SettingVersion):
name = parser["general"]["name"]
return self._upgradeProfileVersion(serialized, name, version)
else: