diff options
Diffstat (limited to 'Cura/util/profile.py')
-rw-r--r-- | Cura/util/profile.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 301b9c9b89..733a953746 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -737,11 +737,16 @@ def loadProfile(filename, allMachines = False): section = 'profile' if set.isAlteration(): section = 'alterations' - if profileParser.has_option(section, set.getName()): - set.setValue(unicode(profileParser.get(section, set.getName()), 'utf-8', 'replace')) - #Upgrade setting from older ini file - if getProfileSetting('retraction_combing') == '1': - putProfileSetting('retraction_combing', 'All') + setting_name = set.getName() + if profileParser.has_option(section, setting_name): + try: + setting = profileParser.get(section, setting_name) + if setting == "Invalid Value": + raise Exception + set.setValue(unicode(setting, 'utf-8', 'replace')) + pass + except: + set.setValue(set.getDefault()) def saveProfile(filename, allMachines = False): """ |