Skip to content
Browse files
[processing] methods in now return layers ordered by name
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.
@@ -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]):
@@ -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():
@@ -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):

0 comments on commit 50113cd

Please sign in to comment.