Skip to content
Permalink
Browse files
Fix for bug #60 digitizing shapefile: REAL values are not stored prop…
…erly

git-svn-id: http://svn.osgeo.org/qgis/trunk@5454 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 15, 2006
1 parent aecc87d commit 7ea461218aff2278521590d9831e56a27fbd6cbe
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/gui/qgsvectorlayer.cpp
  2. +2 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -1587,7 +1587,7 @@ bool QgsVectorLayer::addFeature(QgsFeature* f, bool alsoUpdateExtent)

//set the endian properly
int end=endian();
memcpy(f->getGeometry(),&end,1);
memcpy(f->getGeometry(),&end,1);//todo: also add endian information properly for multipoint,-line,-polygon

//assign a temporary id to the feature (use negative numbers)
addedIdLowWaterMark--;
@@ -1526,6 +1526,8 @@ const std::list<std::pair<QString, QString> >& attributes)
if(it->second == "Real")
{
OGRFieldDefn field(it->first, OFTReal);
field.SetPrecision(3);
field.SetWidth(32);
if(layer->CreateField(&field) != OGRERR_NONE)
{
QgsLogger::warning("creation of OFTReal field failed");

0 comments on commit 7ea4612

Please sign in to comment.