Skip to content
Permalink
Browse files

[processing] List 'All files (*.*)' option last in save as dialogs

See https://ux.stackexchange.com/questions/111689/file-dialog-formats-list-should-all-files-be-listed-first-or-last for discussion:

- for 'file open' dialogs, wildcard options should be listed first
- for 'file save' dialogs, wildcard options should be listed last
  • Loading branch information
nyalldawson committed Sep 12, 2017
1 parent 3d3b6d1 commit 8fcad6aed9c729d3195fca14c493db9de2420a67
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/gui/ParameterGuiUtils.py
@@ -62,7 +62,7 @@ def getFileFilter(param):
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
for i in range(len(exts)):
exts[i] = tr('{0} files (*.{1})', 'QgsProcessingParameterRasterDestination').format(exts[i].upper(), exts[i].lower())
return tr('All files (*.*)') + ';;' + ';;'.join(exts)
return ';;'.join(exts) + ';;' + tr('All files (*.*)')
elif param.type() == 'table':
exts = ['csv', 'dbf']
for i in range(len(exts)):
@@ -72,12 +72,12 @@ def getFileFilter(param):
exts = QgsVectorFileWriter.supportedFormatExtensions()
for i in range(len(exts)):
exts[i] = tr('{0} files (*.{1})', 'ParameterVector').format(exts[i].upper(), exts[i].lower())
return tr('All files (*.*)') + ';;' + ';;'.join(exts)
return ';;'.join(exts) + ';;' + tr('All files (*.*)')
elif param.type() == 'source':
return QgsProviderRegistry.instance().fileVectorFilters()
elif param.type() == 'vector':
return QgsProviderRegistry.instance().fileVectorFilters()
elif param.type() == 'fileDestination':
return tr('All files (*.*)') + ';;' + param.fileFilter()
return param.fileFilter() + ';;' + tr('All files (*.*)')

return ''

0 comments on commit 8fcad6a

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