Skip to content

Commit

Permalink
[processing] use combined vector and raster filters for map layer fil…
Browse files Browse the repository at this point in the history
…e picker
  • Loading branch information
nirvn authored Jan 16, 2018
1 parent 4b9c808 commit add40c1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/plugins/processing/gui/ParameterGuiUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ def getFileFilter(param):
:param param:
:return:
"""
if param.type() == 'multilayer':
if param.type() == 'layer':
vectors = QgsProviderRegistry.instance().fileVectorFilters().split(';;')
vectors.pop(0)
rasters = QgsProviderRegistry.instance().fileRasterFilters().split(';;')
rasters.pop(0)
filters = set(vectors + rasters)
filters = sorted(filters)
return tr('All files (*.*)') + ';;' + ";;".join(filters)
elif param.type() == 'multilayer':
if param.layerType() == QgsProcessing.TypeRaster:
exts = QgsRasterFileWriter.supportedFormatExtensions()
elif param.layerType() == QgsProcessing.TypeFile:
Expand Down

0 comments on commit add40c1

Please sign in to comment.