Zero out parent rule when overridden by local property.

Fixes https://gitlab.com/kicad/code/kicad/issues/11197
This commit is contained in:
Jeff Young 2022-03-21 20:49:08 +00:00
parent b3ae0fdca5
commit b679a21651
1 changed files with 5 additions and 0 deletions

View File

@ -1219,6 +1219,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
if( localA > global || localB > global ) if( localA > global || localB > global )
{ {
constraint.SetParentRule( nullptr );
constraint.SetName( m_msg ); constraint.SetName( m_msg );
constraint.m_Value.SetMin( clearance ); constraint.m_Value.SetMin( clearance );
return constraint; return constraint;
@ -1238,6 +1239,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
EscapeHTML( footprint->GetSelectMenuText( UNITS ) ), EscapeHTML( footprint->GetSelectMenuText( UNITS ) ),
EscapeHTML( PrintZoneConnection( local ) ) ) ) EscapeHTML( PrintZoneConnection( local ) ) ) )
constraint.SetParentRule( nullptr );
constraint.SetName( _( "footprint" ) ); constraint.SetName( _( "footprint" ) );
constraint.m_ZoneConnection = local; constraint.m_ZoneConnection = local;
return constraint; return constraint;
@ -1253,6 +1255,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( zone->GetSelectMenuText( UNITS ) ),
EscapeHTML( PrintZoneConnection( local ) ) ) ) EscapeHTML( PrintZoneConnection( local ) ) ) )
constraint.SetParentRule( nullptr );
constraint.SetName( _( "zone" ) ); constraint.SetName( _( "zone" ) );
constraint.m_ZoneConnection = local; constraint.m_ZoneConnection = local;
return constraint; return constraint;
@ -1269,6 +1272,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( zone->GetSelectMenuText( UNITS ) ),
EscapeHTML( REPORT_VALUE( local ) ) ) ) EscapeHTML( REPORT_VALUE( local ) ) ) )
constraint.SetParentRule( nullptr );
constraint.SetName( _( "zone" ) ); constraint.SetName( _( "zone" ) );
constraint.m_Value.SetMin( local ); constraint.m_Value.SetMin( local );
return constraint; return constraint;
@ -1285,6 +1289,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
EscapeHTML( zone->GetSelectMenuText( UNITS ) ), EscapeHTML( zone->GetSelectMenuText( UNITS ) ),
EscapeHTML( REPORT_VALUE( local ) ) ) ) EscapeHTML( REPORT_VALUE( local ) ) ) )
constraint.SetParentRule( nullptr );
constraint.SetName( _( "zone" ) ); constraint.SetName( _( "zone" ) );
constraint.m_Value.SetMin( local ); constraint.m_Value.SetMin( local );
return constraint; return constraint;