Skip to content

Commit a09aa76

Browse files
author
Rado Guzinski
committedMay 26, 2014
[processing] Allow algorithm providers to set the allowed output raster extensions if needed
1 parent 3799f11 commit a09aa76

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎python/plugins/processing/outputs/OutputRaster.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ class OutputRaster(Output):
3535
compatible = None
3636

3737
def getFileFilter(self, alg):
38-
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
38+
providerExts = alg.provider.getSupportedOutputRasterLayerExtensions()
39+
if providerExts == ['tif']:
40+
# use default extensions
41+
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
42+
else:
43+
# use extensions given by the algorithm provider
44+
exts = providerExts
3945
for i in range(len(exts)):
4046
exts[i] = exts[i].upper() + ' files(*.' + exts[i].lower() + ')'
4147
return ';;'.join(exts)

0 commit comments

Comments
 (0)
Please sign in to comment.