From e09ecd8380c261144274b9a3b96a61354c75eb4d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 18 Feb 2022 12:34:08 +0000 Subject: [PATCH] Don't ask for layer of multi-layer objects. --- pcbnew/drc/drc_test_provider_disallow.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_disallow.cpp b/pcbnew/drc/drc_test_provider_disallow.cpp index 63d727f37d..768774ae13 100644 --- a/pcbnew/drc/drc_test_provider_disallow.cpp +++ b/pcbnew/drc/drc_test_provider_disallow.cpp @@ -97,16 +97,14 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run() [&]( BOARD_ITEM* item ) -> bool { 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 ) { - if( item->Type() == PCB_TEXT_T - || item->Type() == PCB_TEXTBOX_T - || BaseType( item->Type() ) == PCB_DIMENSION_T ) - { - std::shared_ptr drc = DRC_ITEM::Create( DRCE_TEXT_ON_EDGECUTS ); - drc->SetItems( item ); - reportViolation( drc, item->GetPosition(), Edge_Cuts ); - } + std::shared_ptr drc = DRC_ITEM::Create( DRCE_TEXT_ON_EDGECUTS ); + drc->SetItems( item ); + reportViolation( drc, item->GetPosition(), Edge_Cuts ); } if( m_drcEngine->IsErrorLimitExceeded( DRCE_ALLOWED_ITEMS ) )