fix 2 minor compil warnings and make a sentence more easily translatable
This commit is contained in:
parent
4a86daa86d
commit
9efc91c107
|
@ -172,15 +172,14 @@ void DRC_ENGINE::loadImplicitRules()
|
||||||
if( !isDefault )
|
if( !isDefault )
|
||||||
{
|
{
|
||||||
expr = wxString::Format( "A.NetClass == '%s' || B.NetClass == '%s'",
|
expr = wxString::Format( "A.NetClass == '%s' || B.NetClass == '%s'",
|
||||||
className,
|
className, className );
|
||||||
className );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DRC_RULE_CONDITION* inNetclassCondition = new DRC_RULE_CONDITION ( expr );
|
DRC_RULE_CONDITION* inNetclassCondition = new DRC_RULE_CONDITION ( expr );
|
||||||
DRC_RULE* rule = createImplicitRule( wxString::Format( _( "netclass '%s'" ),
|
DRC_RULE* nc_rule = createImplicitRule( wxString::Format( _( "netclass '%s'" ),
|
||||||
className ));
|
className ));
|
||||||
|
|
||||||
rule->m_Condition = inNetclassCondition;
|
nc_rule->m_Condition = inNetclassCondition;
|
||||||
|
|
||||||
// Only add netclass clearances if they're larger than board minimums. That way
|
// Only add netclass clearances if they're larger than board minimums. That way
|
||||||
// board minimums will still enforce a global minimum.
|
// board minimums will still enforce a global minimum.
|
||||||
|
@ -189,7 +188,7 @@ void DRC_ENGINE::loadImplicitRules()
|
||||||
{
|
{
|
||||||
DRC_CONSTRAINT ncClearanceConstraint( DRC_CONSTRAINT_TYPE_CLEARANCE );
|
DRC_CONSTRAINT ncClearanceConstraint( DRC_CONSTRAINT_TYPE_CLEARANCE );
|
||||||
ncClearanceConstraint.Value().SetMin( nc->GetClearance() );
|
ncClearanceConstraint.Value().SetMin( nc->GetClearance() );
|
||||||
rule->AddConstraint( ncClearanceConstraint );
|
nc_rule->AddConstraint( ncClearanceConstraint );
|
||||||
}
|
}
|
||||||
|
|
||||||
ruleCount++;
|
ruleCount++;
|
||||||
|
|
|
@ -85,8 +85,8 @@ bool DRC_TEST_PROVIDER_ANNULUS::Run()
|
||||||
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ANNULUS ) )
|
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ANNULUS ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int v_min;
|
int v_min = 0;
|
||||||
int v_max;
|
int v_max = 0;
|
||||||
VIA* via = dyn_cast<VIA*>( item );
|
VIA* via = dyn_cast<VIA*>( item );
|
||||||
|
|
||||||
// fixme: check minimum IAR/OAR ring for THT pads too
|
// fixme: check minimum IAR/OAR ring for THT pads too
|
||||||
|
@ -117,11 +117,17 @@ bool DRC_TEST_PROVIDER_ANNULUS::Run()
|
||||||
{
|
{
|
||||||
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_ANNULUS );
|
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_ANNULUS );
|
||||||
|
|
||||||
m_msg.Printf( drcItem->GetErrorText() + _( " (%s %s annulus %s; actual %s)" ),
|
if( fail_min )
|
||||||
|
m_msg.Printf( drcItem->GetErrorText() + _( " (%s min annulus %s; actual %s)" ),
|
||||||
constraint.GetName(),
|
constraint.GetName(),
|
||||||
fail_min ? _( "min" ) : _( "max" ),
|
|
||||||
MessageTextFromValue( userUnits(), annulus, true ),
|
MessageTextFromValue( userUnits(), annulus, true ),
|
||||||
MessageTextFromValue( userUnits(), fail_min ? v_min : v_max, true ) );
|
MessageTextFromValue( userUnits(), v_min, true ) );
|
||||||
|
|
||||||
|
if( fail_max )
|
||||||
|
m_msg.Printf( drcItem->GetErrorText() + _( " (%s max annulus %s; actual %s)" ),
|
||||||
|
constraint.GetName(),
|
||||||
|
MessageTextFromValue( userUnits(), annulus, true ),
|
||||||
|
MessageTextFromValue( userUnits(), v_max, true ) );
|
||||||
|
|
||||||
drcItem->SetErrorMessage( m_msg );
|
drcItem->SetErrorMessage( m_msg );
|
||||||
drcItem->SetItems( item );
|
drcItem->SetItems( item );
|
||||||
|
|
Loading…
Reference in New Issue