From 0c20c0b4af75f5513f22cb2edae5a7a141d340db Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 27 Apr 2020 18:03:38 +0100 Subject: [PATCH] Fix broken hole-to-track test. --- pcbnew/drc/drc_clearance_test_functions.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/drc/drc_clearance_test_functions.cpp b/pcbnew/drc/drc_clearance_test_functions.cpp index 0ccecced03..85f014f917 100644 --- a/pcbnew/drc/drc_clearance_test_functions.cpp +++ b/pcbnew/drc/drc_clearance_test_functions.cpp @@ -336,6 +336,13 @@ void DRC::doTrackDrc( TRACK* aRefSeg, TRACKS::iterator aStartIt, TRACKS::iterato if( !inflatedBB.Contains( pad->GetPosition() ) ) continue; + if( !( pad->GetLayerSet() & layerMask ).any() ) + continue; + + // No need to check pads with the same net as the refSeg. + if( pad->GetNetCode() && aRefSeg->GetNetCode() == pad->GetNetCode() ) + continue; + if( pad->GetDrillSize().x > 0 ) { wxString clearanceSource; @@ -380,13 +387,6 @@ void DRC::doTrackDrc( TRACK* aRefSeg, TRACKS::iterator aStartIt, TRACKS::iterato } } - if( !( pad->GetLayerSet() & layerMask ).any() ) - continue; - - // No need to check pads with the same net as the refSeg. - if( pad->GetNetCode() && aRefSeg->GetNetCode() == pad->GetNetCode() ) - continue; - wxString clearanceSource; int minClearance = aRefSeg->GetClearance( pad, &clearanceSource ); int actual;