mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] Fix file format combo showing formats in random orders
This commit is contained in:
parent
1e661e37b9
commit
d44bc112e0
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user