mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[Processing] Use default value of boolean parameter in the modeler and fix typo in outputs.py
This commit is contained in:
parent
41286e5061
commit
9096a64a6c
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user