Skip to content

Commit

Permalink
Some addition error case info
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 6, 2018
1 parent e67939b commit eeb6f44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/plugins/processing/modeler/ModelerGraphicItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def __init__(self, element, model, controls, scene=None):
painter = QPainter(self.picture)
svg.render(painter)
self.pixmap = None
self.text = self.model.parameterDefinition(element.parameterName()).description()
paramDef = self.model.parameterDefinition(element.parameterName())
if paramDef:
self.text = paramDef.description()
else:
self.text = 'Error ({})'.format(element.parameterName())
elif isinstance(element, QgsProcessingModelOutput):
# Output name
svg = QSvgRenderer(os.path.join(pluginPath, 'images', 'output.svg'))
Expand Down

0 comments on commit eeb6f44

Please sign in to comment.