Skip to content

Commit

Permalink
[Processing] Use default value of boolean parameter in the modeler an…
Browse files Browse the repository at this point in the history
…d fix typo in outputs.py
  • Loading branch information
radosuav committed Dec 15, 2015
1 parent 41286e5 commit 9096a64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/core/outputs.py
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions python/plugins/processing/modeler/ModelerParametersDialog.py
Expand Up @@ -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)
Expand Down

0 comments on commit 9096a64

Please sign in to comment.