Skip to content
Permalink
Browse files

[tracer] Skip duplicate points in the path (to avoid geometry errors)

  • Loading branch information
wonder-sk committed Jan 10, 2016
1 parent 70c5fe5 commit bf8571dde58b16553d27b78f1cf64a3ab7b49cb1
Showing with 2 additions and 1 deletion.
  1. +0 −1 src/core/qgstracer.cpp
  2. +2 −0 src/gui/qgsmaptoolcapture.cpp
@@ -444,7 +444,6 @@ void extract_linework( QgsGeometry* g, QgsMultiPolyline& mpl )
}
}


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


@@ -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] );
}

0 comments on commit bf8571d

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