Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix for bug #1570, move vertex after add vertex introduces new vertic…
- Loading branch information
Showing
with
19 additions
and
1 deletion.
-
+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() ); |
|
|