Skip to content


[processing] methods in now return layers ordered by name
Browse files Browse the repository at this point in the history
fixes #10446
  • Loading branch information
volaya authored and jef-n committed Jul 11, 2014
1 parent 6c73e00 commit 50113cd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions python/plugins/processing/tools/
Expand Up @@ -76,7 +76,7 @@ def getRasterLayers():
if layer.type() == layer.RasterLayer:
if layer.providerType() == 'gdal': # only gdal file-based layers
return raster
return sorted(raster, key=lambda layer:

def getVectorLayers(shapetype=[-1]):
Expand All @@ -86,17 +86,16 @@ def getVectorLayers(shapetype=[-1]):
if layer.type() == layer.VectorLayer:
if shapetype == ALL_TYPES or layer.geometryType() in shapetype:
uri = unicode(layer.source())
if not uri.lower().endswith('csv') \
and not uri.lower().endswith('dbf'):
if not uri.lower().endswith('csv') and not uri.lower().endswith('dbf'):
return vector
return sorted(vector, key=lambda layer:

def getAllLayers():
layers = []
layers += getRasterLayers()
layers += getVectorLayers()
return layers
return sorted(layers, key=lambda layer:

def getTables():
Expand All @@ -105,7 +104,7 @@ def getTables():
for layer in layers:
if layer.type() == layer.VectorLayer:
return tables
return sorted(tables, key=lambda table:

def extent(layers):
Expand Down

0 comments on commit 50113cd

Please sign in to comment.