From c02cadec2a6702c43af6d835b552f3c290fa209c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 15 Jan 2022 00:19:36 +0000 Subject: [PATCH] Exclude rules which match no enabled layers. Fixes https://gitlab.com/kicad/code/kicad/issues/10227 (cherry picked from commit 0967cc82e2a5813622ca80b58b34bd8fe5211c0e) --- pcbnew/drc/drc_engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 7e6b5df3d6..89fc77a0ee 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -1016,7 +1016,8 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO } } - if( aLayer != UNDEFINED_LAYER && !c->layerTest.test( aLayer ) ) + if( ( aLayer != UNDEFINED_LAYER && !c->layerTest.test( aLayer ) ) + || ( m_board->GetEnabledLayers() & c->layerTest ).count() == 0 ) { if( implicit ) {