Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix for a bug which prevented commiting changed multiline geometries
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5419 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 4, 2006
1 parent 0314c97 commit 914c2dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsgeometry.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit 914c2dc

Please sign in to comment.