Skip to content

Commit

Permalink
Only insert segment snap points in the layer they belong
Browse files Browse the repository at this point in the history
Fixes #13952
  • Loading branch information
strk committed Jun 30, 2016
1 parent 9a28b51 commit 647ab4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/nodetool/qgsmaptoolnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,11 @@ int QgsMapToolNodeTool::insertSegmentVerticesForSnap( const QList<QgsSnappingRes
QList<QgsSnappingResult>::const_iterator it = snapResults.constBegin();
for ( ; it != snapResults.constEnd(); ++it )
{
//skip if snappingResult is in a different layer
//See http://hub.qgis.org/issues/13952#note-29
if ( it->layer != editedLayer )
continue;

//skip if id is in skip list or we have already added a vertex to a feature
if ( skipFids.contains( it->snappedAtGeometry ) || addedFeatures.contains( it->snappedAtGeometry ) )
continue;
Expand Down

0 comments on commit 647ab4e

Please sign in to comment.