Skip to content

Commit

Permalink
Fix for bug #60 digitizing shapefile: REAL values are not stored prop…
Browse files Browse the repository at this point in the history
…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 7ea4612
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7ea4612

Please sign in to comment.