Skip to content
Permalink
Browse files

[Processing] Fix when iface is None

  • Loading branch information
rldhont committed Apr 20, 2016
1 parent c887899 commit 7b64dd4c0e4fb714f5704dcf1ed96ee63d93237f
@@ -385,7 +385,8 @@ def setOutputCRS(self):
return
try:
from qgis.utils import iface
self.crs = iface.mapCanvas().mapSettings().destinationCrs()
if iface is not None:
self.crs = iface.mapCanvas().mapSettings().destinationCrs()
except:
pass

@@ -375,9 +375,10 @@ def prepareAlgorithm(self, alg):
if param.name in alg.params:
value = self.resolveValue(alg.params[param.name])
else:
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)
if iface is not None:
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
if value is None and isinstance(param, ParameterExtent):
value = self.getMinCoveringExtent()

0 comments on commit 7b64dd4

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