Skip to content

Commit

Permalink
oops, didn't see patch, patch implementation more elegant (qt-ish), t…
Browse files Browse the repository at this point in the history
…hanks alexbruy

git-svn-id: http://svn.osgeo.org/qgis/trunk@13026 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Mar 8, 2010
1 parent 4fa5e8f commit 1def2d3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions python/plugins/fTools/tools/doDefineProj.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ def accept(self):
self.progressBar.setValue(60)
outputWkt = srsDefine.toWkt()
self.progressBar.setValue(65)
outputPrj = open(unicode("%s.prj" % inPath), "w")
outputFile = QFile( inPath + ".prj" )
outputFile.open( QIODevice.WriteOnly | QIODevice.Text )
outputPrj = QTextStream( outputFile )
self.progressBar.setValue(70)
outputPrj.write(outputWkt)
outputPrj << outputWkt
self.progressBar.setValue(75)
outputPrj.close()
#mLayer = self.getMapLayerByName(inName)
#self.progressBar.setValue(90)
#if not mLayer.isValid():
#QMessageBox.information(self, self.tr("Define current projection"), self.tr("Unable to dynamically define projection.\nPlease reload layer manually for projection definition to take effect."))
#else:
outputPrj.flush()
outputFile.close()
self.progressBar.setValue(95)
vLayer.setCrs(srsDefine)
self.progressBar.setValue(100)
Expand Down

0 comments on commit 1def2d3

Please sign in to comment.