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 31
31
from qgis .core import *
32
32
from qgis .gui import *
33
33
34
+ import locale
35
+
34
36
# From two input attribute maps, create single attribute map
35
37
def combineVectorAttributes ( atMapA , atMapB ):
36
38
attribA = atMapA .values ()
@@ -183,7 +185,7 @@ def getLayerNames( vTypes ):
183
185
elif layer .type () == QgsMapLayer .RasterLayer :
184
186
if "Raster" in vTypes :
185
187
layerlist .append ( unicode ( layer .name () ) )
186
- return layerlist
188
+ return sorted ( layerlist , cmp = locale . strcoll )
187
189
188
190
# Return list of names of all fields from input QgsVectorLayer
189
191
def getFieldNames ( vlayer ):
@@ -192,7 +194,7 @@ def getFieldNames( vlayer ):
192
194
for name , field in fieldmap .iteritems ():
193
195
if not field .name () in fieldlist :
194
196
fieldlist .append ( unicode ( field .name () ) )
195
- return fieldlist
197
+ return sorted ( fieldlist , cmp = locale . strcoll )
196
198
197
199
# Return QgsVectorLayer from a layer name ( as string )
198
200
def getVectorLayerByName ( myName ):
You can’t perform that action at this time.
0 commit comments