Skip to content
Permalink
Browse files

Fix for bug #1570, move vertex after add vertex introduces new vertic…

…es when snapping is active

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10517 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Apr 9, 2009
1 parent 4fc4b8c commit bbb13f585aac39789bea11ebd09544025879930c
Showing with 19 additions and 1 deletion.
  1. +19 −1 src/app/qgsmaptooladdvertex.cpp
@@ -96,7 +96,25 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
if ( topologicalEditing )
{
insertSegmentVerticesForSnap( snapResults, vlayer );
//ignore the snapping results that are on features / segments already considered in mRecentSnappingResults
QList<QgsSnappingResult> filteredSnapResults = snapResults;
QList<QgsSnappingResult>::iterator recentIt = mRecentSnappingResults.begin();
for(; recentIt != mRecentSnappingResults.end(); ++recentIt)
{
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
for(; filterIt != filteredSnapResults.end(); ++filterIt)
{
if(filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
{
filteredSnapResults.erase(filterIt);
continue;
}

}
}
insertSegmentVerticesForSnap( filteredSnapResults, vlayer );
}

snappedPointMapCoord = snapPointFromResults( snapResults, e->pos() );

0 comments on commit bbb13f5

Please sign in to comment.
You can’t perform that action at this time.