Skip to content

Commit

Permalink
[convert to curve] PR review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
  • Loading branch information
2 people authored and nyalldawson committed Jun 18, 2021
1 parent 6aa7de8 commit 10b5aa9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/geometry/qgscompoundcurve.cpp
Expand Up @@ -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 ) )
{
Expand Down

0 comments on commit 10b5aa9

Please sign in to comment.