Skip to content
Permalink
Browse files

[Processing][Modeler] Use default value instead of None

In Modeler algorithm, when a algorithm's parameter was not defined it's value was set to None.
Before the possibility to defined optional parameters, None value is equal to set value to default one.
Now, it's important to use default value instead of None.
  • Loading branch information
rldhont committed Apr 27, 2016
1 parent e9bc8ae commit 4a11a1a3198dba0f2e3592ca345c6cbda5d020c1
@@ -389,7 +389,7 @@ def prepareAlgorithm(self, alg):
iface.messageBar().pushMessage(self.tr("Warning"),
self.tr("Parameter %s in algorithm %s in the model is run with default value! Edit the model to make sure that this is correct.") % (param.name, alg.name),
QgsMessageBar.WARNING, 4)
value = None
value = param.default
if value is None and isinstance(param, ParameterExtent):
value = self.getMinCoveringExtent()
# We allow unexistent filepaths, since that allows
@@ -454,7 +454,7 @@ def setPreviousValues(self):
if param.name in alg.params:
value = alg.params[param.name]
else:
value = None
value = param.default
if isinstance(param, (
ParameterRaster,
ParameterVector,

0 comments on commit 4a11a1a

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