Skip to content
Permalink
Browse files

[processing] fixes in modeler to make multiple inputs work correctly

  • Loading branch information
volaya committed May 21, 2014
1 parent 1e4d6a9 commit 7f218c72950b31191406dae03c71e6279bbad7ca
Showing with 9 additions and 11 deletions.
  1. +9 −11 python/plugins/processing/modeler/ModelerAlgorithm.py
@@ -464,8 +464,7 @@ def serialize(self):
pt = self.algPos[i]
s += str(pt.x()) + ',' + str(pt.y()) + '\n'
if len(self.dependencies[i]) != 0:
s += ','.join([str(index) for index in self.dependencies[i]]) \
+ '\n'
s += ','.join([str(index) for index in self.dependencies[i]]) + '\n'
else:
s += str(None) + '\n'
for param in alg.parameters:
@@ -517,12 +516,12 @@ def prepareAlgorithm(self, alg, iAlg):
else:
value = self.getValueFromAlgorithmAndParameter(aap)

# We allow unexistent filepaths, since that allows
# algorithms to skip some conversion routines
if not param.setValue(value) and not isinstance(param,
ParameterDataObject):
raise GeoAlgorithmExecutionException('Wrong value: '
+ str(value))
# We allow unexistent filepaths, since that allows
# algorithms to skip some conversion routines
if not param.setValue(value) and not isinstance(param,
ParameterDataObject):
raise GeoAlgorithmExecutionException('Wrong value: '
+ str(value))
for out in alg.outputs:
if not out.hidden:
val = self.algOutputs[iAlg][out.name]
@@ -579,9 +578,8 @@ def getValueFromAlgorithmAndParameter(self, aap):
return None
if float(aap.alg) \
== float(AlgorithmAndParameter.PARENT_MODEL_ALGORITHM):
for key in self.paramValues.keys():
if aap.param == key:
return self.paramValues[key]
if aap.param in self.paramValues.keys():
return self.paramValues[aap.param]
for param in self.parameters:
if aap.param == param.name:
return param.value

0 comments on commit 7f218c7

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