Skip to content
Permalink
Browse files

Fix some use of direct project key read when getter should be used

  • Loading branch information
nyalldawson committed Mar 14, 2017
1 parent 0ecba44 commit 1e5f64919d490a0407d81a50fdac2f3d4aa2e90d
@@ -112,8 +112,7 @@ def processAlgorithm(self, feedback):
# 2 - ellipsoidal

if method == 2:
ellips = QgsProject.instance().readEntry('Measure', '/Ellipsoid',
'NONE')[0]
ellips = QgsProject.instance().ellipsoid()
crs = layer.crs().srsid()
elif method == 1:
mapCRS = iface.mapCanvas().mapSettings().destinationCrs()
@@ -100,8 +100,7 @@ def processAlgorithm(self, feedback):
da = QgsDistanceArea()
da.setSourceCrs(layer.crs())
da.setEllipsoidalMode(True)
da.setEllipsoid(QgsProject.instance().readEntry(
'Measure', '/Ellipsoid', GEO_NONE)[0])
da.setEllipsoid(QgsProject.instance().ellipsoid())
exp.setGeomCalculator(da)
exp.setDistanceUnits(QgsProject.instance().distanceUnits())
exp.setAreaUnits(QgsProject.instance().areaUnits())
@@ -104,8 +104,7 @@ def processAlgorithm(self, feedback):
da = QgsDistanceArea()
da.setSourceCrs(layer.crs())
da.setEllipsoidalMode(True)
da.setEllipsoid(QgsProject.instance().readEntry(
'Measure', '/Ellipsoid', GEO_NONE)[0])
da.setEllipsoid(QgsProject.instance().ellipsoid())

exp_context = layer.createExpressionContext()

0 comments on commit 1e5f649

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