Skip to content

Commit

Permalink
[tracer] Skip duplicate points in the path (to avoid geometry errors)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jan 10, 2016
1 parent 70c5fe5 commit bf8571d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/qgstracer.cpp
Expand Up @@ -444,7 +444,6 @@ void extract_linework( QgsGeometry* g, QgsMultiPolyline& mpl )
}
}


// -------------


Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -208,6 +208,8 @@ bool QgsMapToolCapture::tracingAddVertex( const QgsPoint& point )

for ( int i = 1; i < points.count(); ++i )
{
if ( points[i] == points[i-1] )
continue; // avoid duplicate vertices if there are any
mRubberBand->addPoint( points[i], i == points.count() - 1 );
mCaptureCurve.addVertex( layerPoints[i-1] );
}
Expand Down

0 comments on commit bf8571d

Please sign in to comment.