Skip to content
Permalink
Browse files
[convert to curve] fix unique pointers
  • Loading branch information
olivierdalang authored and nyalldawson committed Jun 18, 2021
1 parent 2c69aca commit bdfe9592fb3e34c607f5e48736ae7a58c813880c
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/core/geometry/qgsgeometry.cpp
@@ -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 );
}
}
}

0 comments on commit bdfe959

Please sign in to comment.