Skip to content
Browse files

[processing] When listing available layer sources for an input in the

model designer, prefer to show the user's defined name for that output
instead of the generic one

Makes it easier to associate inputs with the correct outputs when
creating models
  • Loading branch information
nyalldawson committed Jan 30, 2020
1 parent abcb8d2 commit d1d7dfe497ccfc9b1c9d391aee4482ef43cae4a9
Showing with 9 additions and 2 deletions.
  1. +9 −2 python/plugins/processing/modeler/
@@ -291,8 +291,15 @@ def resolveValueDescription(self, value):
return self.model.parameterDefinition(value.parameterName()).description()
elif value.source() == QgsProcessingModelChildParameterSource.ChildOutput:
alg = self.model.childAlgorithm(value.outputChildId())
return"'{0}' from algorithm '{1}'").format(
alg.algorithm().outputDefinition(value.outputName()).description(), alg.description())

output_name = alg.algorithm().outputDefinition(value.outputName()).description()
# see if this output has been named by the model designer -- if so, we use that friendly name
for name, output in alg.modelOutputs().items():
if output.childOutputName() == value.outputName():
output_name = name

return"'{0}' from algorithm '{1}'").format(output_name, alg.description())

return value

0 comments on commit d1d7dfe

Please sign in to comment.
You can’t perform that action at this time.