[Processing] Use default value of boolean parameter in the modeler and fix typo in outputs.py

This commit is contained in:
radosuav 2015-12-11 12:59:25 +01:00
parent 41286e5061
commit 9096a64a6c
2 changed files with 5 additions and 1 deletions

View File

@ -161,7 +161,7 @@ class OutputRaster(Output):
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

View File

@ -277,6 +277,10 @@ class ModelerParametersDialog(QDialog):
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)