File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
python/plugins/processing Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ def initWidgets(self):
126126 break
127127
128128 widget_context = QgsProcessingParameterWidgetContext ()
129- widget_context .setMapCanvas (iface .mapCanvas ())
129+ if iface is not None :
130+ widget_context .setMapCanvas (iface .mapCanvas ())
130131
131132 # Create widgets and put them in layouts
132133 for param in self .alg .parameterDefinitions ():
Original file line number Diff line number Diff line change @@ -146,7 +146,8 @@ def setupUi(self):
146146 self .verticalLayout .addWidget (self .algorithmItem )
147147
148148 widget_context = QgsProcessingParameterWidgetContext ()
149- widget_context .setMapCanvas (iface .mapCanvas ())
149+ if iface is not None :
150+ widget_context .setMapCanvas (iface .mapCanvas ())
150151 widget_context .setModel (self .model )
151152 widget_context .setModelChildAlgorithmId (self .childId )
152153
You can’t perform that action at this time.
0 commit comments