Skip to content

Commit

Permalink
fixed bug when deleting elements
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@109 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed Apr 17, 2012
1 parent 931387c commit 9eeec08
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sextante/modeler/ModelerAlgorithm.py
Expand Up @@ -346,6 +346,7 @@ def removeAlgorithm(self, index):
self.removeOutputFromName(name)
del self.algs[index]
del self.algParameters[index]
del self.algOutputs[index]
del self.algPos[index]
self.updateModelerView()
return True
Expand All @@ -363,8 +364,13 @@ def hasDependencies(self, element, elementIndex):
if isinstance(element, Parameter):
for alg in self.algParameters:
for aap in alg.values():
if aap.alg == AlgorithmAndParameter.PARENT_MODEL_ALGORITHM and aap.param == element.name:
return True
if aap.alg == AlgorithmAndParameter.PARENT_MODEL_ALGORITHM:
if aap.param == element.name:
return True
elif aap.param in self.paramValues: #check for multiple inputs
aap2 = self.paramValues[aap.param]
if element.name in aap2:
return True
if isinstance(element, ParameterVector):
for param in self.parameters:
if isinstance(param, ParameterTableField):
Expand Down

0 comments on commit 9eeec08

Please sign in to comment.