Skip to content
Permalink
Browse files

[processing] fix Field calculator algorthm (fix #11488)

  • Loading branch information
alexbruy committed Nov 22, 2014
1 parent f273edb commit 663779671924946bcf5b714b60744a57b4859414
Showing with 7 additions and 6 deletions.
  1. +7 −6 python/plugins/processing/algs/qgis/FieldsCalculator.py
@@ -87,7 +87,8 @@ def processAlgorithm(self, progress):

if output.value == '':
ext = output.getDefaultFileExtension(self)
output.value = system.getTempFilenameInTempFolder(output.name + '.' + ext)
output.value = system.getTempFilenameInTempFolder(
output.name + '.' + ext)

provider = layer.dataProvider()
fields = layer.pendingFields()
@@ -101,11 +102,11 @@ def processAlgorithm(self, progress):

da = QgsDistanceArea()
da.setSourceCrs(layer.crs().srsid())
#canvas = iface.mapCanvas()
#da.setEllipsoidalMode(iface.mapCanvas().mapRenderer().hasCrsTransformEnabled())
da.setEllipsoid(QgsProject.instance().readEntry('Measure',
'/Ellipsoid',
GEO_NONE)[0])
canvas = iface.mapCanvas()
da.setEllipsoidalMode(
iface.mapCanvas().mapSettings().hasCrsTransformEnabled())
da.setEllipsoid(QgsProject.instance().readEntry(
'Measure', '/Ellipsoid', GEO_NONE)[0])
exp.setGeomCalculator(da)

if not exp.prepare(layer.pendingFields()):

0 comments on commit 6637796

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