Skip to content

Commit 03ff4b9

Browse files

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎src/gui/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ bool QgsVectorLayer::addFeature(QgsFeature* f, bool alsoUpdateExtent)
15871587

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

15921592
//assign a temporary id to the feature (use negative numbers)
15931593
addedIdLowWaterMark--;

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,8 @@ const std::list<std::pair<QString, QString> >& attributes)
15261526
if(it->second == "Real")
15271527
{
15281528
OGRFieldDefn field(it->first, OFTReal);
1529+
field.SetPrecision(3);
1530+
field.SetWidth(32);
15291531
if(layer->CreateField(&field) != OGRERR_NONE)
15301532
{
15311533
QgsLogger::warning("creation of OFTReal field failed");

0 commit comments

Comments
 (0)
Please sign in to comment.