Skip to content
Permalink
Browse files

[Processing] correctly parse value of boolean argument for parameters

  • Loading branch information
volaya committed Nov 8, 2015
1 parent b6717b6 commit 5c1da4ebae2449ce38957f771b744a80cc786530
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/plugins/processing/core/parameters.py
@@ -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):
"""
@@ -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):
@@ -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 = []

0 comments on commit 5c1da4e

Please sign in to comment.
You can’t perform that action at this time.