Skip to content

Commit

Permalink
Fix tests on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 21, 2018
1 parent ced9559 commit 0c79d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/gui/ParametersPanel.py
Expand Up @@ -126,7 +126,8 @@ def initWidgets(self):
break

widget_context = QgsProcessingParameterWidgetContext()
widget_context.setMapCanvas(iface.mapCanvas())
if iface is not None:
widget_context.setMapCanvas(iface.mapCanvas())

# Create widgets and put them in layouts
for param in self.alg.parameterDefinitions():
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/processing/modeler/ModelerParametersDialog.py
Expand Up @@ -146,7 +146,8 @@ def setupUi(self):
self.verticalLayout.addWidget(self.algorithmItem)

widget_context = QgsProcessingParameterWidgetContext()
widget_context.setMapCanvas(iface.mapCanvas())
if iface is not None:
widget_context.setMapCanvas(iface.mapCanvas())
widget_context.setModel(self.model)
widget_context.setModelChildAlgorithmId(self.childId)

Expand Down

0 comments on commit 0c79d08

Please sign in to comment.