Skip to content

Commit daf65d8

Browse files
committedJan 13, 2017
[processing] handle string settings from previous install (followup 03eaad5)
1 parent f01b2f0 commit daf65d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎python/plugins/processing/core/ProcessingConfig.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,7 @@ def getSetting(name):
232232
v = None
233233
except:
234234
pass
235-
if ProcessingConfig.settings[name].valuetype == Setting.SELECTION:
236-
return ProcessingConfig.settings[name].options.index(v)
237-
else:
238-
return v
235+
return v
239236
else:
240237
return None
241238

@@ -328,7 +325,10 @@ def read(self, qsettings=QSettings()):
328325
value = str(value).lower() == str(True).lower()
329326

330327
if self.valuetype == self.SELECTION:
331-
self.value = self.options[int(value)]
328+
try:
329+
self.value = self.options[int(value)]
330+
except:
331+
self.value = self.options[0]
332332
else:
333333
self.value = value
334334

0 commit comments

Comments
 (0)
Please sign in to comment.