Fix pad shape for certain legacy circular pads

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8615
This commit is contained in:
Jon Evans 2021-06-15 22:25:44 -04:00
parent 45c7c7c350
commit 8f9800f760
1 changed files with 2 additions and 1 deletions

View File

@ -598,7 +598,8 @@ void PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
{
case PAD_SHAPE::CIRCLE:
case PAD_SHAPE::OVAL:
if( dx == dy )
// Note: dx == dy is not guaranted for circle pads in legacy boards
if( dx == dy || ( GetShape() == PAD_SHAPE::CIRCLE ) )
{
TransformCircleToPolygon( aCornerBuffer, padShapePos, dx + aClearanceValue, aError,
aErrorLoc );