mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] Fix an exception in modeler when editing a model in
which a child algorithm later has a new parameter added
This commit is contained in:
parent
11991c5297
commit
c817e38be2
@ -308,13 +308,17 @@ class ModelerParametersDialog(QDialog):
|
||||
value = value[0]
|
||||
elif isinstance(value, list) and len(value) == 0:
|
||||
value = None
|
||||
if value is None:
|
||||
value = param.defaultValue()
|
||||
|
||||
wrapper = self.wrappers[param.name()]
|
||||
if issubclass(wrapper.__class__, QgsProcessingModelerParameterWidget):
|
||||
if value is None:
|
||||
value = QgsProcessingModelChildParameterSource.fromStaticValue(param.defaultValue())
|
||||
|
||||
wrapper.setWidgetValue(value)
|
||||
else:
|
||||
if value is None:
|
||||
value = param.defaultValue()
|
||||
|
||||
if isinstance(value,
|
||||
QgsProcessingModelChildParameterSource) and value.source() == QgsProcessingModelChildParameterSource.StaticValue:
|
||||
value = value.staticValue()
|
||||
|
Loading…
x
Reference in New Issue
Block a user