Skip to content

Commit

Permalink
Fix working with inputs in modeler
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 20, 2017
1 parent bdc5e22 commit 5d8f2d9
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 83 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def addParameter(self, param):
self.inputs[param.param.name()] = param

def updateParameter(self, param):
self.inputs[param.name].param = param
self.inputs[param.name()].param = param

def addAlgorithm(self, alg):
name = self.getNameForAlgorithm(alg)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/modeler/ModelerGraphicItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, element, model, controls):
painter = QPainter(self.picture)
svg.render(painter)
self.pixmap = None
self.text = element.param.description
self.text = element.param.description()
elif isinstance(element, ModelerOutput):
# Output name
svg = QSvgRenderer(os.path.join(pluginPath, 'images', 'output.svg'))
Expand Down Expand Up @@ -191,7 +191,7 @@ def editElement(self):
if dlg.param is not None:
self.model.updateParameter(dlg.param)
self.element.param = dlg.param
self.text = dlg.param.description
self.text = dlg.param.description()
self.update()
elif isinstance(self.element, Algorithm):
dlg = self.element.algorithm.getCustomModelerParametersDialog(self.model, self.element.modeler_name)
Expand Down
Loading

0 comments on commit 5d8f2d9

Please sign in to comment.