Don't ask for layer of multi-layer objects.

This commit is contained in:
Jeff Young 2022-02-18 12:34:08 +00:00
parent 2fddc9daf3
commit e09ecd8380
1 changed files with 6 additions and 8 deletions

View File

@ -97,16 +97,14 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run()
[&]( BOARD_ITEM* item ) -> bool [&]( BOARD_ITEM* item ) -> bool
{ {
if( !m_drcEngine->IsErrorLimitExceeded( DRCE_TEXT_ON_EDGECUTS ) if( !m_drcEngine->IsErrorLimitExceeded( DRCE_TEXT_ON_EDGECUTS )
&& ( item->Type() == PCB_TEXT_T
|| item->Type() == PCB_TEXTBOX_T
|| BaseType( item->Type() ) == PCB_DIMENSION_T )
&& item->GetLayer() == Edge_Cuts ) && item->GetLayer() == Edge_Cuts )
{ {
if( item->Type() == PCB_TEXT_T std::shared_ptr<DRC_ITEM> drc = DRC_ITEM::Create( DRCE_TEXT_ON_EDGECUTS );
|| item->Type() == PCB_TEXTBOX_T drc->SetItems( item );
|| BaseType( item->Type() ) == PCB_DIMENSION_T ) reportViolation( drc, item->GetPosition(), Edge_Cuts );
{
std::shared_ptr<DRC_ITEM> drc = DRC_ITEM::Create( DRCE_TEXT_ON_EDGECUTS );
drc->SetItems( item );
reportViolation( drc, item->GetPosition(), Edge_Cuts );
}
} }
if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) ) if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) )