Skip to content

Commit

Permalink
[processing] provide non-random default ordering of parameters in models
Browse files Browse the repository at this point in the history
Fixes #11702
  • Loading branch information
volaya committed Nov 21, 2014
1 parent 9837f43 commit 530b15a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,16 @@ def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/model.png')

def defineCharacteristics(self):
self.parameters = [inp.param for inp in self.inputs.values()]
classes = [ParameterRaster, ParameterVector, ParameterTable, ParameterTableField,
ParameterBoolean, ParameterString, ParameterNumber]
self.parameters = []
for c in classes:
for inp in self.inputs.values():
if isinstance(inp.param, c):
self.parameters.append(inp.param)
for inp in self.inputs.values():
if inp.param not in self.parameters:
self.parameters.append(inp.param)
self.outputs = []
for alg in self.algs.values():
if alg.active:
Expand Down

0 comments on commit 530b15a

Please sign in to comment.