Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix editing models with custom params
- Loading branch information
|
@@ -400,9 +400,14 @@ def accept(self): |
|
|
isinstance(self.param, QgsProcessingParameterCrs)): |
|
|
self.param = QgsProcessingParameterCrs(name, description, self.selector.crs().authid()) |
|
|
else: |
|
|
paramTypeDef = QgsApplication.instance().processingRegistry().parameterType(self.paramType) |
|
|
if self.paramType: |
|
|
typeId = self.paramType |
|
|
else: |
|
|
typeId = self.param.type() |
|
|
|
|
|
paramTypeDef = QgsApplication.instance().processingRegistry().parameterType(typeId) |
|
|
if not paramTypeDef: |
|
|
msg = self.tr('The parameter `{}` is not registered, are you missing a required plugin?'.format(self.paramType)) |
|
|
msg = self.tr('The parameter `{}` is not registered, are you missing a required plugin?'.format(typeId)) |
|
|
raise UndefinedParameterException(msg) |
|
|
self.param = paramTypeDef.create(name) |
|
|
self.param.setDescription(name) |
|
|