Skip to content

Commit 0e76df6

Browse files
committedJul 13, 2014
[processing] Changed raster calculator to ask main layer separately
1 parent 6475043 commit 0e76df6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎python/plugins/processing/algs/saga/RasterCalculator.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ def defineCharacteristics(self):
5858
self.name = 'Raster calculator'
5959
self.cmdname = 'Grid Calculator'
6060
self.undecoratedGroup = "grid_calculus"
61-
self.group = SagaGroupNameDecorator.getDecoratedName(self.undecoratedGroup)
62-
grids = ParameterRaster(self.GRIDS, 'Input layers', True)
63-
grids.hidden = True
64-
self.addParameter(grids)
65-
self.addParameter(ParameterMultipleInput(self.XGRIDS, 'Input layers',
61+
self.group = SagaGroupNameDecorator.getDecoratedName(self.undecoratedGroup)
62+
self.addParameter(ParameterRaster(self.GRIDS, 'Main input layers'))
63+
self.addParameter(ParameterMultipleInput(self.XGRIDS, 'Additional layers',
6664
ParameterMultipleInput.TYPE_RASTER, False))
6765
self.addParameter(ParameterString(self.FORMULA, "Formula"))
6866
self.addOutput(OutputRaster(self.RESULT, "Result"))
6967

7068

71-
def processAlgorithm(self, progress):
72-
xgrids = self.getParameterValue(self.XGRIDS)
73-
layers = xgrids.split(';')
74-
grid = layers[0]
75-
self.setParameterValue(self.GRIDS, grid)
76-
xgrids = ";".join(layers[1:])
77-
if xgrids == "": xgrids = None
78-
self.setParameterValue(self.XGRIDS, xgrids)
79-
SagaAlgorithm.processAlgorithm(self, progress)
69+
#===========================================================================
70+
# def processAlgorithm(self, progress):
71+
# xgrids = self.getParameterValue(self.XGRIDS)
72+
# layers = xgrids.split(';')
73+
# grid = layers[0]
74+
# self.setParameterValue(self.GRIDS, grid)
75+
# xgrids = ";".join(layers[1:])
76+
# if xgrids == "": xgrids = None
77+
# self.setParameterValue(self.XGRIDS, xgrids)
78+
# SagaAlgorithm.processAlgorithm(self, progress)
79+
#===========================================================================

0 commit comments

Comments
 (0)
Please sign in to comment.