File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
python/plugins/processing/modeler Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -140,17 +140,21 @@ def setupUi(self):
140
140
line .setFrameShape (QFrame .HLine )
141
141
line .setFrameShadow (QFrame .Sunken )
142
142
self .verticalLayout .addWidget (line )
143
- self .algorithmItem = QgsGui .instance ().processingGuiRegistry ().algorithmConfigurationWidget (self ._alg )
144
- if self .configuration :
145
- self .algorithmItem .setConfiguration (self .configuration )
146
- self .verticalLayout .addWidget (self .algorithmItem )
147
143
148
144
widget_context = QgsProcessingParameterWidgetContext ()
149
145
if iface is not None :
150
146
widget_context .setMapCanvas (iface .mapCanvas ())
151
147
widget_context .setModel (self .model )
152
148
widget_context .setModelChildAlgorithmId (self .childId )
153
149
150
+ self .algorithmItem = QgsGui .instance ().processingGuiRegistry ().algorithmConfigurationWidget (self ._alg )
151
+ if self .algorithmItem :
152
+ self .algorithmItem .setWidgetContext (widget_context )
153
+ self .algorithmItem .registerProcessingContextGenerator (self .context_generator )
154
+ if self .configuration :
155
+ self .algorithmItem .setConfiguration (self .configuration )
156
+ self .verticalLayout .addWidget (self .algorithmItem )
157
+
154
158
for param in self ._alg .parameterDefinitions ():
155
159
if param .flags () & QgsProcessingParameterDefinition .FlagAdvanced :
156
160
self .advancedButton = QPushButton ()
You can’t perform that action at this time.
0 commit comments