File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
python/plugins/fTools/tools Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3131from qgis .core import *
3232from qgis .gui import *
3333
34+ import locale
35+
3436# From two input attribute maps, create single attribute map
3537def combineVectorAttributes ( atMapA , atMapB ):
3638 attribA = atMapA .values ()
@@ -183,7 +185,7 @@ def getLayerNames( vTypes ):
183185 elif layer .type () == QgsMapLayer .RasterLayer :
184186 if "Raster" in vTypes :
185187 layerlist .append ( unicode ( layer .name () ) )
186- return layerlist
188+ return sorted ( layerlist , cmp = locale . strcoll )
187189
188190# Return list of names of all fields from input QgsVectorLayer
189191def getFieldNames ( vlayer ):
@@ -192,7 +194,7 @@ def getFieldNames( vlayer ):
192194 for name , field in fieldmap .iteritems ():
193195 if not field .name () in fieldlist :
194196 fieldlist .append ( unicode ( field .name () ) )
195- return fieldlist
197+ return sorted ( fieldlist , cmp = locale . strcoll )
196198
197199# Return QgsVectorLayer from a layer name ( as string )
198200def getVectorLayerByName ( myName ):
You can’t perform that action at this time.
0 commit comments