From b022b314a48810cd6b94a565908ffbbbb5682fa0 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 3 Nov 2021 12:10:51 -0700 Subject: [PATCH] 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 --- pcbnew/pad.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index 0433e7e3cf..27206eb622 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -486,6 +486,10 @@ void PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const m_effectiveHoleShape = std::make_shared( 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;