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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Apr 17 01:49:15 EDT 2011


Author: alexbruy
Date: 2011-04-16 22:49:15 -0700 (Sat, 16 Apr 2011)
New Revision: 15739

Modified:
   trunk/qgis/python/plugins/fTools/tools/doGeometry.py
Log:
extend default field width in fTools Export/Add Geometry column to fix #3500


Modified: trunk/qgis/python/plugins/fTools/tools/doGeometry.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doGeometry.py	2011-04-17 00:04:03 UTC (rev 15738)
+++ trunk/qgis/python/plugins/fTools/tools/doGeometry.py	2011-04-17 05:49:15 UTC (rev 15739)
@@ -829,20 +829,20 @@
       plp = "Poly"
       ( found, index1 ) = self.checkForField( nameList, "AREA" )
       if not found:
-        field = QgsField( "AREA", QVariant.Double, "double", 10, 6, self.tr("Polygon area") )
+        field = QgsField( "AREA", QVariant.Double, "double", 21, 6, self.tr("Polygon area") )
         index1 = len( fieldList.keys() )
         fieldList[ index1 ] = field
       ( found, index2 ) = self.checkForField( nameList, "PERIMETER" )
 
       if not found:
-        field = QgsField( "PERIMETER", QVariant.Double, "double", 10, 6, self.tr("Polygon perimeter") )
+        field = QgsField( "PERIMETER", QVariant.Double, "double", 21, 6, self.tr("Polygon perimeter") )
         index2 = len( fieldList.keys() )
         fieldList[ index2 ] = field
     elif geomType == QGis.Line:
       plp = "Line"
       (found, index1) = self.checkForField(nameList, "LENGTH")
       if not found:
-        field = QgsField("LENGTH", QVariant.Double, "double", 10, 6, self.tr("Line length") )
+        field = QgsField("LENGTH", QVariant.Double, "double", 21, 6, self.tr("Line length") )
         index1 = len(fieldList.keys())
         fieldList[index1] = field
       index2 = index1
@@ -850,12 +850,12 @@
       plp = "Point"
       (found, index1) = self.checkForField(nameList, "XCOORD")
       if not found:
-        field = QgsField("XCOORD", QVariant.Double, "double", 10, 6, self.tr("Point x coordinate") )
+        field = QgsField("XCOORD", QVariant.Double, "double", 21, 6, self.tr("Point x coordinate") )
         index1 = len(fieldList.keys())
         fieldList[index1] = field
       (found, index2) = self.checkForField(nameList, "YCOORD")
       if not found:
-        field = QgsField("YCOORD", QVariant.Double, "double", 10, 6, self.tr("Point y coordinate") )
+        field = QgsField("YCOORD", QVariant.Double, "double", 21, 6, self.tr("Point y coordinate") )
         index2 = len(fieldList.keys())
         fieldList[index2] = field
     return (fieldList, index1, index2)



More information about the QGIS-commit mailing list