Skip to content
Permalink
Browse files
[convert to curve] PR review
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
2 people authored and nyalldawson committed Jun 18, 2021
1 parent 6aa7de8 commit 10b5aa9d48b3e1cac1b815dede8c8e1d045137ec
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/core/geometry/qgscompoundcurve.cpp
@@ -961,19 +961,19 @@ bool QgsCompoundCurve::convertVertex( QgsVertexId position )
QgsPointSequence partB = QgsPointSequence() << points[subVertexId.vertex - 1] << points[subVertexId.vertex] << points[subVertexId.vertex + 1];
QgsPointSequence partC = points.mid( subVertexId.vertex + 1 );

QgsCircularString *curveA = new QgsCircularString();
std::unique_ptr<QgsCircularString> curveA = std::make_unique<QgsCircularString>();
curveA->setPoints( partA );
QgsLineString *curveB = new QgsLineString();
std::unique_ptr<QgsLineString> curveB = std::make_unique<QgsLineString>();
curveB->setPoints( partB );
QgsCircularString *curveC = new QgsCircularString();
std::unique_ptr<QgsCircularString> curveC = std::make_unique<QgsCircularString>();
curveC->setPoints( partC );

removeCurve( curveId );
if ( subVertexId.vertex < points.length() - 2 )
mCurves.insert( curveId, curveC );
mCurves.insert( curveId, curveB );
mCurves.insert( curveId.release(), curveC.release() );
mCurves.insert( curveId, curveB.release() );
if ( subVertexId.vertex > 1 )
mCurves.insert( curveId, curveA );
mCurves.insert( curveId, curveA.release() );
}
else if ( const QgsLineString *lineString = dynamic_cast<const QgsLineString *>( curve ) )
{

0 comments on commit 10b5aa9

Please sign in to comment.