Skip to content
Permalink
Browse files

Allow algorithms to link to multiple depandant parameters in modeler …

…scene
  • Loading branch information
nyalldawson committed Dec 19, 2019
1 parent 3e9aaaa commit b8b668888c49a78df99c358035a141de28d05cd0
Showing with 10 additions and 6 deletions.
  1. +10 −6 python/plugins/processing/modeler/ModelerScene.py
@@ -99,14 +99,18 @@ def paintModel(self, model, controls=True):
for input_name in list(model.parameterComponents().keys()):
idx = 0
parameter_def = model.parameterDefinition(input_name)
parent_name = None
parent_names = []
if hasattr(parameter_def, 'parentLayerParameterName') and parameter_def.parentLayerParameterName():
parent_name = parameter_def.parentLayerParameterName()
parent_names.append(parameter_def.parentLayerParameterName())
if hasattr(parameter_def, 'parentLayoutParameterName') and parameter_def.parentLayoutParameterName():
parent_name = parameter_def.parentLayoutParameterName()
elif hasattr(parameter_def, 'parentParameterName') and parameter_def.parentParameterName():
parent_name = parameter_def.parentParameterName()
if parent_name:
parent_names.append(parameter_def.parentLayoutParameterName())
if hasattr(parameter_def, 'parentParameterName') and parameter_def.parentParameterName():
parent_names.append(parameter_def.parentParameterName())
if hasattr(parameter_def, 'sourceCrsParameterName') and parameter_def.sourceCrsParameterName():
parent_names.append(parameter_def.sourceCrsParameterName())
if hasattr(parameter_def, 'destinationCrsParameterName') and parameter_def.destinationCrsParameterName():
parent_names.append(parameter_def.destinationCrsParameterName())
for parent_name in parent_names:
if input_name in self.paramItems and parent_name in self.paramItems:
input_item = self.paramItems[input_name]
parent_item = self.paramItems[parent_name]

0 comments on commit b8b6688

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