[QGIS Commit] r11755 - trunk/qgis/python/plugins/fTools/tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Oct 4 14:06:45 EDT 2009


Author: cfarmer
Date: 2009-10-04 14:06:44 -0400 (Sun, 04 Oct 2009)
New Revision: 11755

Modified:
   trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py
Log:
fixes bug where new fields started with integer (integer now appended to end of field name)


Modified: trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py	2009-10-04 12:12:01 UTC (rev 11754)
+++ trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py	2009-10-04 18:06:44 UTC (rev 11755)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 #-----------------------------------------------------------
 # 
 # Locate Line Intersections
@@ -123,11 +124,11 @@
 		fieldList = self.getFieldList(layer1)
 		index1 = provider1.fieldNameIndex(field1)
 		field1 = fieldList[index1]
-		field1.setName("1_" + unicode(field1.name()))
+		field1.setName(unicode(field1.name()) + "_1")
 		fieldList = self.getFieldList(layer2)
 		index2 = provider2.fieldNameIndex(field2)
 		field2 = fieldList[index2]
-		field2.setName("2_" + unicode(field2.name()))
+		field2.setName(unicode(field2.name()) + "_2")
 		fieldList = {0:field1, 1:field2}
 		sRs = provider1.crs()
 		check = QFile(self.shapefileName)



More information about the QGIS-commit mailing list