Skip to content

Commit

Permalink
[processing] fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 20, 2016
1 parent 3b70b84 commit 908a380
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass/GrassAlgorithm.py
Expand Up @@ -453,7 +453,7 @@ def exportVectorLayer(self, orgFilename):

def setSessionProjectionFromProject(self, commands):
if not GrassUtils.projectionSet:
proj4 = iface.mapCanvas().mapRenderer().destinationCrs().toProj4()
proj4 = iface.mapCanvas().mapSettings().destinationCrs().toProj4()
command = 'g.proj'
command += ' -c'
command += ' proj4="' + proj4 + '"'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -513,7 +513,7 @@ def exportVectorLayer(self, orgFilename):

def setSessionProjectionFromProject(self, commands):
if not Grass7Utils.projectionSet:
proj4 = iface.mapCanvas().mapRenderer().destinationCrs().toProj4()
proj4 = iface.mapCanvas().mapSettings().destinationCrs().toProj4()
command = 'g.proj'
command += ' -c'
command += ' proj4="' + proj4 + '"'
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ExportGeometryInfo.py
Expand Up @@ -95,7 +95,7 @@ def processAlgorithm(self, progress):
'NONE')[0]
crs = layer.crs().srsid()
elif method == 1:
mapCRS = iface.mapCanvas().mapRenderer().destinationCrs()
mapCRS = iface.mapCanvas().mapSettings().destinationCrs()
layCRS = layer.crs()
coordTransform = QgsCoordinateTransform(layCRS, mapCRS)

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -385,7 +385,7 @@ def setOutputCRS(self):
return
try:
from qgis.utils import iface
self.crs = iface.mapCanvas().mapRenderer().destinationCrs()
self.crs = iface.mapCanvas().mapSettings().destinationCrs()
except:
pass

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/ExtentSelectionPanel.py
Expand Up @@ -161,7 +161,7 @@ def useLayerExtent(self):
CANVAS_KEY = 'Use canvas extent'
extentsDict = {}
extentsDict[CANVAS_KEY] = {"extent": iface.mapCanvas().extent(),
"authid": iface.mapCanvas().mapRenderer().destinationCrs().authid()}
"authid": iface.mapCanvas().mapSettings().destinationCrs().authid()}
extents = [CANVAS_KEY]
layers = dataobjects.getAllLayers()
for layer in layers:
Expand All @@ -177,7 +177,7 @@ def useLayerExtent(self):
self.tr('Use extent from'), extents, False)
if ok:
self.setValueFromRect(extentsDict[item]["extent"])
if extentsDict[item]["authid"] != iface.mapCanvas().mapRenderer().destinationCrs().authid():
if extentsDict[item]["authid"] != iface.mapCanvas().mapSettings().destinationCrs().authid():
iface.messageBar().pushMessage(self.tr("Warning"),
self.tr("The projection of the chosen layer is not the same as canvas projection! The selected extent might not be what was intended."),
QgsMessageBar.WARNING, 8)
Expand Down
2 changes: 0 additions & 2 deletions python/plugins/processing/gui/NumberInputPanel.py
Expand Up @@ -95,5 +95,3 @@ def calculateStep(self, minimum, maximum):
return round(step, -int(floor(log10(step))))
else:
return 1.0


0 comments on commit 908a380

Please sign in to comment.