Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -386,7 +386,8 @@ def setOutputCRS(self): | |
return | ||
try: | ||
from qgis.utils import iface | ||
self.crs = iface.mapCanvas().mapSettings().destinationCrs() | ||
if iface is not None: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rldhont
Author
Contributor
|
||
self.crs = iface.mapCanvas().mapSettings().destinationCrs() | ||
except: | ||
pass | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,9 +385,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) | ||
This comment has been minimized.
Sorry, something went wrong.
m-kuhn
Member
|
||
value = None | ||
if value is None and isinstance(param, ParameterExtent): | ||
value = self.getMinCoveringExtent() | ||
|
Wasn't that caught by the exception already?