Skip to content

Commit cbbb79f

Browse files
author
alexbruy
committedApr 17, 2011
extend default field width in fTools Export/Add Geometry column to fix #3500
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15739 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎python/plugins/fTools/tools/doGeometry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -829,33 +829,33 @@ def checkGeometryFields( self, vlayer ):
829829
plp = "Poly"
830830
( found, index1 ) = self.checkForField( nameList, "AREA" )
831831
if not found:
832-
field = QgsField( "AREA", QVariant.Double, "double", 10, 6, self.tr("Polygon area") )
832+
field = QgsField( "AREA", QVariant.Double, "double", 21, 6, self.tr("Polygon area") )
833833
index1 = len( fieldList.keys() )
834834
fieldList[ index1 ] = field
835835
( found, index2 ) = self.checkForField( nameList, "PERIMETER" )
836836

837837
if not found:
838-
field = QgsField( "PERIMETER", QVariant.Double, "double", 10, 6, self.tr("Polygon perimeter") )
838+
field = QgsField( "PERIMETER", QVariant.Double, "double", 21, 6, self.tr("Polygon perimeter") )
839839
index2 = len( fieldList.keys() )
840840
fieldList[ index2 ] = field
841841
elif geomType == QGis.Line:
842842
plp = "Line"
843843
(found, index1) = self.checkForField(nameList, "LENGTH")
844844
if not found:
845-
field = QgsField("LENGTH", QVariant.Double, "double", 10, 6, self.tr("Line length") )
845+
field = QgsField("LENGTH", QVariant.Double, "double", 21, 6, self.tr("Line length") )
846846
index1 = len(fieldList.keys())
847847
fieldList[index1] = field
848848
index2 = index1
849849
else:
850850
plp = "Point"
851851
(found, index1) = self.checkForField(nameList, "XCOORD")
852852
if not found:
853-
field = QgsField("XCOORD", QVariant.Double, "double", 10, 6, self.tr("Point x coordinate") )
853+
field = QgsField("XCOORD", QVariant.Double, "double", 21, 6, self.tr("Point x coordinate") )
854854
index1 = len(fieldList.keys())
855855
fieldList[index1] = field
856856
(found, index2) = self.checkForField(nameList, "YCOORD")
857857
if not found:
858-
field = QgsField("YCOORD", QVariant.Double, "double", 10, 6, self.tr("Point y coordinate") )
858+
field = QgsField("YCOORD", QVariant.Double, "double", 21, 6, self.tr("Point y coordinate") )
859859
index2 = len(fieldList.keys())
860860
fieldList[index2] = field
861861
return (fieldList, index1, index2)

0 commit comments

Comments
 (0)
Please sign in to comment.