Skip to content
Permalink
Browse files

Much simpler code for determining linked parameters in modeler

  • Loading branch information
nyalldawson committed Mar 3, 2020
1 parent 616504b commit ef8f26e3a7158d3f52617ae74fbbd4962616fd7a
Showing with 1 addition and 13 deletions.
  1. +1 −13 python/plugins/processing/modeler/ModelerScene.py
@@ -83,20 +83,8 @@ def paintModel(self, model):

# Input dependency arrows
for input_name in list(model.parameterComponents().keys()):
idx = 0
parameter_def = model.parameterDefinition(input_name)
parent_names = []
if hasattr(parameter_def, 'parentLayerParameterName') and parameter_def.parentLayerParameterName():
parent_names.append(parameter_def.parentLayerParameterName())
if hasattr(parameter_def, 'parentLayoutParameterName') and parameter_def.parentLayoutParameterName():
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:
for parent_name in parameter_def.dependsOnOtherParameters():
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 ef8f26e

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