Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 7, 2016
1 parent 179a92c commit fbc5e0f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/core/parameters.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def getAsScriptCode(self):
return '##' + self.name + '=' + param_type return '##' + self.name + '=' + param_type





class ParameterPoint(Parameter): class ParameterPoint(Parameter):


def __init__(self, name='', description='', default=None, optional=False): def __init__(self, name='', description='', default=None, optional=False):
Expand Down Expand Up @@ -846,6 +845,7 @@ def getAsScriptCode(self):




class ParameterTableField(Parameter): class ParameterTableField(Parameter):

"""A parameter representing a table field. """A parameter representing a table field.
Its value is a string that represents the name of the field. Its value is a string that represents the name of the field.
Expand Down Expand Up @@ -899,6 +899,7 @@ def getAsScriptCode(self):




class ParameterTableMultipleField(Parameter): class ParameterTableMultipleField(Parameter):

"""A parameter representing several table fields. """A parameter representing several table fields.
Its value is a string with items separated by semicolons, each of Its value is a string with items separated by semicolons, each of
which represents the name of each field. which represents the name of each field.
Expand Down
1 change: 1 addition & 0 deletions python/plugins/processing/gui/ListMultiselectWidget.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@




class ListMultiSelectWidget(QGroupBox): class ListMultiSelectWidget(QGroupBox):

"""Widget to show two parallel lists and move elements between the two """Widget to show two parallel lists and move elements between the two
usage from code: usage from code:
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/ParametersPanel.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ def updateDependentFields(self):
not isinstance(child, ParameterTableMultipleField)): not isinstance(child, ParameterTableMultipleField)):
widget.addItem(self.tr('[not set]')) widget.addItem(self.tr('[not set]'))
widget.addItems( widget.addItems(
self.getFields(layer, self.alg.getParameterFromName( self.getFields(layer, self.alg.getParameterFromName(
child.name).datatype)) child.name).datatype))
if isinstance(child, OutputVector): if isinstance(child, OutputVector):
child.base_layer = layer child.base_layer = layer


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def setupUi(self):
self.horizontalLayoutParent.addWidget(self.state) self.horizontalLayoutParent.addWidget(self.state)
self.verticalLayout.addLayout(self.horizontalLayoutParent) self.verticalLayout.addLayout(self.horizontalLayoutParent)
elif self.paramType in ( elif self.paramType in (
ModelerParameterDefinitionDialog.PARAMETER_TABLE_FIELD, ModelerParameterDefinitionDialog.PARAMETER_TABLE_FIELD,
ModelerParameterDefinitionDialog.PARAMETER_TABLE_MULTIPLE_FIELD)\ ModelerParameterDefinitionDialog.PARAMETER_TABLE_MULTIPLE_FIELD)\
or isinstance(self.param, (ParameterTableField, or isinstance(self.param, (ParameterTableField,
ParameterTableMultipleField)): ParameterTableMultipleField)):
Expand All @@ -146,7 +146,7 @@ def setupUi(self):


# add the datatype selector # add the datatype selector
self.horizontalLayoutDatatype.addWidget(QLabel(self.tr('Allowed ' self.horizontalLayoutDatatype.addWidget(QLabel(self.tr('Allowed '
'data type'))) 'data type')))
self.datatypeCombo = QComboBox() self.datatypeCombo = QComboBox()
self.datatypeCombo.addItem(self.tr('Any'), -1) self.datatypeCombo.addItem(self.tr('Any'), -1)
self.datatypeCombo.addItem(self.tr('Number'), 0) self.datatypeCombo.addItem(self.tr('Number'), 0)
Expand Down
1 change: 1 addition & 0 deletions python/plugins/processing/tests/ParametersTest.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ def testOptional(self):




class ParameterTableMultipleFieldTest(unittest.TestCase): class ParameterTableMultipleFieldTest(unittest.TestCase):

def setUp(self): def setUp(self):
self.parent_name = 'test_parent_layer' self.parent_name = 'test_parent_layer'
test_data = points2() test_data = points2()
Expand Down

0 comments on commit fbc5e0f

Please sign in to comment.