Skip to content
Permalink
Browse files

[processing] use combined vector and raster filters for map layer fil…

…e picker
  • Loading branch information
nirvn committed Jan 16, 2018
1 parent 4b9c808 commit add40c1e2268b67a3080d4186ac6baa2abe7747e
Showing with 9 additions and 1 deletion.
  1. +9 −1 python/plugins/processing/gui/ParameterGuiUtils.py
@@ -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:

0 comments on commit add40c1

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