diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index cf9c3a15d1..fadd9b3fbe 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -1475,6 +1475,9 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& bool PAD::HitTest( const VECTOR2I& aPosition, int aAccuracy, PCB_LAYER_ID aLayer ) const { + if( !IsOnLayer( aLayer ) ) + return false; + VECTOR2I delta = aPosition - GetPosition(); int boundingRadius = GetBoundingRadius() + aAccuracy;