From b679a216515956b8cc71eae7c7e7be9a228f9e50 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 21 Mar 2022 20:49:08 +0000 Subject: [PATCH] Zero out parent rule when overridden by local property. Fixes https://gitlab.com/kicad/code/kicad/issues/11197 --- pcbnew/drc/drc_engine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index d2a7926be1..92365fcd61 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -1219,6 +1219,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO if( localA > global || localB > global ) { + constraint.SetParentRule( nullptr ); constraint.SetName( m_msg ); constraint.m_Value.SetMin( clearance ); return constraint; @@ -1238,6 +1239,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO EscapeHTML( footprint->GetSelectMenuText( UNITS ) ), EscapeHTML( PrintZoneConnection( local ) ) ) ) + constraint.SetParentRule( nullptr ); constraint.SetName( _( "footprint" ) ); constraint.m_ZoneConnection = local; return constraint; @@ -1253,6 +1255,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( PrintZoneConnection( local ) ) ) ) + constraint.SetParentRule( nullptr ); constraint.SetName( _( "zone" ) ); constraint.m_ZoneConnection = local; return constraint; @@ -1269,6 +1272,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( REPORT_VALUE( local ) ) ) ) + constraint.SetParentRule( nullptr ); constraint.SetName( _( "zone" ) ); constraint.m_Value.SetMin( local ); return constraint; @@ -1285,6 +1289,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( REPORT_VALUE( local ) ) ) ) + constraint.SetParentRule( nullptr ); constraint.SetName( _( "zone" ) ); constraint.m_Value.SetMin( local ); return constraint;