Skip to content
Permalink
Browse files

[Processing] Use default value of boolean parameter in the modeler an…

…d fix typo in outputs.py
  • Loading branch information
radosuav
radosuav committed Dec 15, 2015
1 parent 41286e5 commit 9096a64a6c543ac8aef5c3121e1801c2e8c07a93
@@ -161,7 +161,7 @@ def getFileFilter(self, alg):

def getDefaultFileExtension(self, alg):
supported = alg.provider.getSupportedOutputRasterLayerExtensions()
default = ProcessingConfig.getSetting(ProcessingConfig.DEFAULT_OUTPUT_VECTOR_LAYER_EXT)
default = ProcessingConfig.getSetting(ProcessingConfig.DEFAULT_OUTPUT_RASTER_LAYER_EXT)
ext = default if default in supported else supported[0]
return ext

@@ -277,6 +277,10 @@ def getWidgetFromParameter(self, param):
bools = self.getAvailableValuesOfType(ParameterBoolean, None)
for b in bools:
item.addItem(self.resolveValueDescription(b), b)
if param.default:
item.setCurrentIndex(0)
else:
item.setCurrentIndex(1)
elif isinstance(param, ParameterSelection):
item = QComboBox()
item.addItems(param.options)

0 comments on commit 9096a64

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