Skip to content
Permalink
Browse files
fix #5257
  • Loading branch information
alexbruy committed Mar 29, 2012
1 parent 287bebe commit 2abd900ed6f73d93866283c9c3dce191d451a686
Showing with 11 additions and 4 deletions.
  1. +11 −4 python/plugins/fTools/tools/doDefineProj.py
@@ -63,13 +63,19 @@ def updateProj1(self, layerName):
self.inRef.clear()
tempLayer = ftools_utils.getVectorLayerByName(layerName)
crs = tempLayer.dataProvider().crs()
self.inRef.insert(crs.authid() + " - " + crs.description())
if crs.isValid():
self.inRef.insert(crs.authid() + " - " + crs.description())
else:
self.inRef.insert( self.tr( "Unknown CRS" ) )

def updateProj2(self, layerName):
self.outRef.clear()
tempLayer = ftools_utils.getVectorLayerByName(layerName)
crs = tempLayer.dataProvider().crs()
self.outRef.insert(crs.authid() + " - " + crs.description())
if crs.isValid():
self.outRef.insert(crs.authid() + " - " + crs.description())
else:
self.outRef.insert( self.tr( "Unknown CRS" ) )

def accept(self):
self.buttonOk.setEnabled( False )
@@ -90,8 +96,9 @@ def accept(self):
else:
srsDefine = QgsCoordinateReferenceSystem()
if self.rdoProjection.isChecked():
outProj = self.txtProjection.text()
srsDefine.createFromProj4(outProj)
outProj = self.txtProjection.text().split( " - " )[ 0 ]
#srsDefine.createFromProj4(outProj)
srsDefine.createFromString(outProj)
else:
destLayer = ftools_utils.getVectorLayerByName(self.cmbLayer.currentText())
srsDefine = destLayer.crs()

0 comments on commit 2abd900

Please sign in to comment.