Change behavior of polygons at the end of drawing.

This commit is contained in:
Josue Huaroto 2023-08-07 22:58:52 +00:00 committed by Jon Evans
parent 8776437f29
commit 670936096e
1 changed files with 4 additions and 0 deletions

View File

@ -1422,6 +1422,10 @@ void EDA_SHAPE::endEdit( bool aClosed )
if( poly.CPoint( poly.GetPointCount() - 2 ) == poly.CLastPoint() )
{
poly.SetClosed( aClosed );
}
else
{
poly.SetClosed( false );
poly.Remove( poly.GetPointCount() - 1 );
}
}