From 9770962ab46e4e52bb603045c16f938729d6a0dd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 22 Aug 2021 20:16:26 +0100 Subject: [PATCH] Fix logic bug in rule processing. Fixes https://gitlab.com/kicad/code/kicad/issues/9011 --- pcbnew/drc/drc_engine.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 57209231f8..7bfb0bc8f1 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -1143,13 +1143,12 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO return constraint; } } - else if( constraint.GetParentRule() ) - { - return constraint; - } - constraint.m_Type = NULL_CONSTRAINT; - constraint.m_DisallowFlags = 0; + if( !constraint.GetParentRule() ) + { + constraint.m_Type = NULL_CONSTRAINT; + constraint.m_DisallowFlags = 0; + } return constraint;