From 3e57700b219da3a42030e2871c042984a935e03b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 21 Aug 2021 16:35:08 +0100 Subject: [PATCH] Process rules in "natural" order using overrides. (We used to process in reverse order with first-match-wins, but that doesn't allow min, max and opt to come from different rules.) Fixes https://gitlab.com/kicad/code/kicad/issues/9004 --- pcbnew/drc/drc_engine.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index c3f5880474..59e6b0bbc2 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -1093,23 +1093,8 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO { std::vector* ruleset = m_constraintMap[ aConstraintType ]; - if( aReporter ) - { - // We want to see all results so process in "natural" order - for( int ii = 0; ii < (int) ruleset->size(); ++ii ) - { - processConstraint( ruleset->at( ii ) ); - } - } - else - { - // Last matching rule wins, so process in reverse order and quit when match found - for( int ii = (int) ruleset->size() - 1; ii >= 0; --ii ) - { - if( processConstraint( ruleset->at( ii ) ) ) - break; - } - } + for( int ii = 0; ii < (int) ruleset->size(); ++ii ) + processConstraint( ruleset->at( ii ) ); } if( constraint.GetParentRule() && !constraint.GetParentRule()->m_Implicit )