Skip to content
Permalink
Browse files
fix for a bug which prevented commiting changed multiline geometries
git-svn-id: http://svn.osgeo.org/qgis/trunk@5419 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 4, 2006
1 parent a064a59 commit 329874901dd84f01acc2729f3705d1021a80bb31
Showing with 6 additions and 0 deletions.
  1. +2 −0 src/core/qgsgeometry.cpp
  2. +4 −0 src/providers/postgres/qgspostgresprovider.cpp
@@ -642,6 +642,7 @@ bool QgsGeometry::deleteVertexAt(QgsGeometryVertexIndex atVertex)
int pointindex = 0;
for(int linenr = 0; linenr < *nLines; ++linenr)
{
memcpy(newBufferPtr, ptr, sizeof(int) + 1);
ptr += (sizeof(int) + 1);
newBufferPtr += (sizeof(int) + 1);
nPoints = (int*)ptr;
@@ -885,6 +886,7 @@ bool QgsGeometry::insertVertexBefore(double x, double y, QgsGeometryVertexIndex

for(int linenr = 0; linenr < *nLines; ++linenr)
{
memcpy(newBufferPtr, ptr, sizeof(int) + 1);
ptr += (sizeof(int) + 1);
newBufferPtr += (sizeof(int) + 1);
nPoints = (int*)ptr;
@@ -1937,6 +1937,10 @@ bool QgsPostgresProvider::changeGeometryValues(std::map<int, QgsGeometry> & geom
sql+="::bytea',"+srid+")";
sql+=" WHERE " +primaryKey+"="+QString::number(iter->first);

#ifdef QGISDEBUG
qWarning(sql);
#endif

#ifdef QGISDEBUG
std::cerr << "QgsPostgresProvider::changeGeometryValues: Updating with '"
<< sql.toLocal8Bit().data()

0 comments on commit 3298749

Please sign in to comment.