Skip to content

Commit

Permalink
[processing] better handling of values in boolean parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jun 30, 2014
1 parent 9204ca0 commit 2e9e954
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/processing/parameters/ParameterBoolean.py
Expand Up @@ -39,7 +39,10 @@ def setValue(self, value):
if value is None:
self.value = self.default
return True
self.value = str(value) == str(True)
if isinstance(value, basestring):
self.value = str(value).lower() == str(True).lower()
else:
self.value = bool(value)
return True

def serialize(self):
Expand Down

0 comments on commit 2e9e954

Please sign in to comment.