Skip to content

Commit

Permalink
[processing] fixed handling of parent algorihtms in modeler
Browse files Browse the repository at this point in the history
Fixes #11750
  • Loading branch information
volaya committed Nov 28, 2014
1 parent 8b65ebd commit c52b5ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion python/plugins/processing/modeler/ModelerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ def _addAlgorithm(self, alg, pos=None):
* ModelerGraphicItem.BOX_HEIGHT)
self.alg.addAlgorithm(dlg.alg)
self.repaintModel()
#self.view.ensureVisible(self.scene.getLastAlgorithmItem())
self.hasChanged = True

def getPositionForAlgorithmItem(self):
Expand Down
8 changes: 3 additions & 5 deletions python/plugins/processing/modeler/ModelerParametersDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ def getAvailableDependencies(self):
opts = []
for alg in self.model.algs.values():
if alg.name not in dependent:
opts.append(alg.algorithm.name)
opts.append(alg)
return opts

def getDependenciesPanel(self):
return MultipleInputPanel(self.getAvailableDependencies())
return MultipleInputPanel([alg.algorithm.name for alg in self.getAvailableDependencies()])

def showAdvancedParametersClicked(self):
self.showAdvanced = not self.showAdvanced
Expand Down Expand Up @@ -468,10 +468,8 @@ def createAlgorithm(self):

selectedOptions = self.dependenciesPanel.selectedoptions
availableDependencies = self.getAvailableDependencies()
self.dependencies = []
for selected in selectedOptions:
s = availableDependencies[selected]
alg.dependencies.append(s)
alg.dependencies.append(availableDependencies[selected].name)

return alg

Expand Down

0 comments on commit c52b5ae

Please sign in to comment.