Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
m-kuhn committed May 5, 2020
1 parent 2dafee5 commit 841328e
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions python/plugins/processing/algs/qgis/RasterCalculator.py
Expand Up @@ -191,27 +191,6 @@ def _cellsize(layer):

return {self.OUTPUT: output}

def processBeforeAddingToModeler(self, algorithm, model):
values = []
expression = algorithm.params[self.EXPRESSION]
for i in list(model.inputs.values()):
param = i.param
if isinstance(param, QgsProcessingParameterRasterLayer) and "{}@".format(param.name) in expression:
values.append(ValueFromInput(param.name())) # noqa TODO: how is that supposed to work??

if algorithm.name:
dependent = model.getDependentAlgorithms(algorithm.name)
else:
dependent = []
for alg in list(model.algs.values()):
if alg.modeler_name not in dependent:
for out in alg.algorithm.outputs:
if (isinstance(out, QgsProcessingOutputRasterLayer) and
"{}:{}@".format(alg.modeler_name, out.name) in expression):
values.append(ValueFromOutput(alg.modeler_name, out.name)) # noqa TODO: how is that supposed to work??

algorithm.params[self.LAYERS] = values

def mappedNameToLayer(self, lyr, expression, layersDict, context):
'''Try to identify if a real layer is mapped in the expression with a symbolic name.'''

Expand Down

0 comments on commit 841328e

Please sign in to comment.