Skip to content

Commit 8fcad6a

Browse files
committed
[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
1 parent 3d3b6d1 commit 8fcad6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/plugins/processing/gui/ParameterGuiUtils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def getFileFilter(param):
6262
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
6363
for i in range(len(exts)):
6464
exts[i] = tr('{0} files (*.{1})', 'QgsProcessingParameterRasterDestination').format(exts[i].upper(), exts[i].lower())
65-
return tr('All files (*.*)') + ';;' + ';;'.join(exts)
65+
return ';;'.join(exts) + ';;' + tr('All files (*.*)')
6666
elif param.type() == 'table':
6767
exts = ['csv', 'dbf']
6868
for i in range(len(exts)):
@@ -72,12 +72,12 @@ def getFileFilter(param):
7272
exts = QgsVectorFileWriter.supportedFormatExtensions()
7373
for i in range(len(exts)):
7474
exts[i] = tr('{0} files (*.{1})', 'ParameterVector').format(exts[i].upper(), exts[i].lower())
75-
return tr('All files (*.*)') + ';;' + ';;'.join(exts)
75+
return ';;'.join(exts) + ';;' + tr('All files (*.*)')
7676
elif param.type() == 'source':
7777
return QgsProviderRegistry.instance().fileVectorFilters()
7878
elif param.type() == 'vector':
7979
return QgsProviderRegistry.instance().fileVectorFilters()
8080
elif param.type() == 'fileDestination':
81-
return tr('All files (*.*)') + ';;' + param.fileFilter()
81+
return param.fileFilter() + ';;' + tr('All files (*.*)')
8282

8383
return ''

0 commit comments

Comments
 (0)