Account for pad hole is BBox

The bounding box is used for hit testing.  If the hole is arbitrarily
larger than the pad, we need to allow the user to properly select it
This commit is contained in:
Seth Hillbrand 2021-11-03 12:10:51 -07:00
parent f3ca0f16e6
commit b022b314a4
1 changed files with 4 additions and 0 deletions

View File

@ -486,6 +486,10 @@ void PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
m_effectiveHoleShape = std::make_shared<SHAPE_SEGMENT>( m_pos - half_len, m_pos + half_len,
half_width * 2 );
bbox = m_effectiveHoleShape->BBox();
m_effectiveBoundingBox.Merge(
EDA_RECT( (wxPoint) bbox.GetPosition(),
wxSize( bbox.GetWidth(), bbox.GetHeight() ) ) );
// All done
m_shapesDirty = false;