Fix incorrect calculation of pad bounding box
Fixes #4776 https://gitlab.com/kicad/code/kicad/issues/4776
This commit is contained in:
parent
f8bfb2bc16
commit
af8f05d570
|
@ -338,9 +338,19 @@ void D_PAD::BuildEffectiveShapes() const
|
|||
//
|
||||
m_effectiveBoundingRadius = calcBoundingRadius();
|
||||
|
||||
bool first_shape = true;
|
||||
|
||||
for( const std::shared_ptr<SHAPE>& shape : m_effectiveShapes )
|
||||
{
|
||||
BOX2I r = shape->BBox();
|
||||
|
||||
if( first_shape )
|
||||
{
|
||||
m_effectiveBoundingBox.SetOrigin( (wxPoint) r.GetOrigin() );
|
||||
m_effectiveBoundingBox.SetEnd( (wxPoint) r.GetEnd() );
|
||||
first_shape = false;
|
||||
}
|
||||
else
|
||||
m_effectiveBoundingBox.Merge( EDA_RECT( (wxPoint) r.GetOrigin(),
|
||||
wxSize( r.GetWidth(), r.GetHeight() ) ) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue