Negative clearance means test won't run, not rule won't match.

Fixes https://gitlab.com/kicad/code/kicad/issues/13947
This commit is contained in:
Jeff Young 2023-02-16 18:05:45 +00:00
parent 245ce7259c
commit 6d22b8c6ed
2 changed files with 3 additions and 9 deletions

View File

@ -881,15 +881,6 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( wxString::Format( _( "Checking %s clearance: %s." ),
EscapeHTML( c->constraint.GetName() ),
MessageTextFromValue( c->constraint.m_Value.Min() ) ) )
if( c->constraint.GetValue().Min() < 0 )
{
// JEY TODO: translate for 8.0....
REPORT( implicit ? wxS( "Negative clearance specified; constraint ignored." )
: wxS( "Negative clearance specified; rule ignored." ) )
return true;
}
break;
case DIFF_PAIR_MAX_UNCOUPLED_CONSTRAINT:

View File

@ -774,6 +774,9 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
r->Report( "" );
r->Report( wxString::Format( _( "Resolved clearance: %s." ),
m_frame->StringFromValue( clearance, true ) ) );
if( clearance < 0 )
r->Report( wxS( "Negative clearance value; clearance will not be tested." ) );
}
r->Flush();