Skip to content
Permalink
Browse files

[processing] Fix file format combo showing formats in random orders

  • Loading branch information
nyalldawson committed Nov 23, 2016
1 parent 1e661e3 commit d44bc112e0c2cf591fade17aa8418531859e762f
Showing with 7 additions and 3 deletions.
  1. +7 −3 python/plugins/processing/tools/dataobjects.py
@@ -70,22 +70,26 @@ def resetLoadedLayers():

def getSupportedOutputVectorLayerExtensions():
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
exts = ['shp'] # shp is the default, should be the first
exts = []
for extension in list(formats.keys()):
extension = str(extension)
extension = extension[extension.find('*.') + 2:]
extension = extension[:extension.find(' ')]
if extension.lower() != 'shp':
exts.append(extension)
exts.sort()
exts.insert(0, 'shp') # shp is the default, should be the first
return exts


def getSupportedOutputRasterLayerExtensions():
allexts = ['tif']
allexts = []
for exts in list(GdalUtils.getSupportedRasters().values()):
for ext in exts:
if ext not in allexts:
if ext != 'tif' and ext not in allexts:
allexts.append(ext)
allexts.sort()
allexts.insert(0, 'tif') # tif is the default, should be the first
return allexts


0 comments on commit d44bc11

Please sign in to comment.
You can’t perform that action at this time.