From 4e885990b876bb955134e45baf7b5752064d0e42 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 26 Aug 2020 14:33:52 +0100 Subject: [PATCH] Don't keepout a keepout's own footprint. Fixes https://gitlab.com/kicad/code/kicad/issues/5371 --- pcbnew/drc/drc_keepout_tester.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/drc/drc_keepout_tester.cpp b/pcbnew/drc/drc_keepout_tester.cpp index 1d5190aa98..fa9ff07817 100644 --- a/pcbnew/drc/drc_keepout_tester.cpp +++ b/pcbnew/drc/drc_keepout_tester.cpp @@ -165,6 +165,9 @@ bool DRC_KEEPOUT_TESTER::checkFootprints() for( MODULE* fp : m_board->Modules() ) { + if( m_zone->GetParent() == fp ) + continue; + if( !m_zoneBBox.Intersects( fp->GetBoundingBox() ) ) continue;