Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[convert to curve] fix unique pointers
  • Loading branch information
olivierdalang authored and nyalldawson committed Jun 18, 2021
1 parent 2c69aca commit bdfe959
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core/geometry/qgsgeometry.cpp
Expand Up @@ -603,21 +603,19 @@ bool QgsGeometry::toggleCircularAtVertex( int atVertex )
// Replace the ring in the owning polygon
if ( id.ring == 0 )
{
owningPolygon->setExteriorRing( cpdCurve.get() );
owningPolygon->setExteriorRing( cpdCurve.release() );
}
else
{
owningPolygon->removeInteriorRing( id.ring - 1 );
owningPolygon->addInteriorRing( cpdCurve.get() );
cpdCurve.release();
owningPolygon->addInteriorRing( cpdCurve.release() );
}
}
else if ( owningCollection != nullptr )
{
// Replace the curve in the owning collection
owningCollection->removeGeometry( id.part );
owningCollection->insertGeometry( cpdCurve.get(), id.part );
cpdCurve.release();
owningCollection->insertGeometry( cpdCurve.release(), id.part );
}
}
}
Expand Down

0 comments on commit bdfe959

Please sign in to comment.