Skip to content

Commit

Permalink
[Processing] correctly parse value of boolean argument for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Nov 8, 2015
1 parent b6717b6 commit 5c1da4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/plugins/processing/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def __init__(self, name='', description='', optional=False):
# It can be used as any other parameter, but it will not be
# shown to the user
self.hidden = False
self.optional = optional

self.optional = parseBool(optional)

def setValue(self, obj):
"""
Expand Down Expand Up @@ -248,7 +249,7 @@ def __init__(self, name='', description='', numRows=3,
if isinstance(cols, basestring):
self.cols = self.cols.split(";")
self.numRows = int(numRows)
self.fixedNumOfRows = fixedNumOfRows
self.fixedNumOfRows = parseBool(fixedNumOfRows)
self.value = None

def setValue(self, obj):
Expand Down Expand Up @@ -575,6 +576,7 @@ class ParameterSelection(Parameter):
def __init__(self, name='', description='', options=[], default=0, isSource=False,
optional=False):
Parameter.__init__(self, name, description, optional)
isSource = parseBool(isSource)
self.options = options
if isSource:
self.options = []
Expand Down

0 comments on commit 5c1da4e

Please sign in to comment.