Skip to content

Commit

Permalink
[processing] don't warn about different CRS's if algorithm has only one
Browse files Browse the repository at this point in the history
input (fix #10964)
  • Loading branch information
alexbruy committed Aug 6, 2014
1 parent 03d6425 commit 24e89a4
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -372,22 +372,17 @@ def checkInputCRS(self):
"""It checks that all input layers use the same CRS. If so,
returns True. False otherwise.
"""
crs = None
layers = dataobjects.getAllLayers()
crsList = []
for param in self.parameters:
if isinstance(param, (ParameterRaster, ParameterVector,
ParameterMultipleInput)):
if param.value:
inputlayers = param.value.split(';')
for inputlayer in inputlayers:
for layer in layers:
if layer.source() == inputlayer:
if crs is None:
crs = layer.crs()
else:
if crs != layer.crs():
return False
return True
layers = param.value.split(';')
for item in layers:
crs = dataobjects.getObject(item).crs()
if crs not in crsList:
crsList.append(crs)
return len(crsList) == 1

def addOutput(self, output):
# TODO: check that name does not exist
Expand Down

0 comments on commit 24e89a4

Please sign in to comment.