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 02a8333 commit d71742ad3ce7088040d8773e0729285e9be20e4e
@@ -379,7 +379,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
@@ -419,7 +419,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 d71742a

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