Make sure a pad has a hole before running hole test on it.
Fixes https://gitlab.com/kicad/code/kicad/issues/7567
This commit is contained in:
parent
e822977367
commit
6f9ebcfdb5
|
@ -103,7 +103,16 @@ bool DRC_TEST_PROVIDER_DISALLOW::Run()
|
|||
item->ClearFlags( HOLE_PROXY );
|
||||
doCheckItem( item );
|
||||
|
||||
if( item->Type() == PCB_VIA_T || item->Type() == PCB_PAD_T )
|
||||
bool hasHole;
|
||||
|
||||
switch( item->Type() )
|
||||
{
|
||||
case PCB_VIA_T: hasHole = true; break;
|
||||
case PCB_PAD_T: hasHole = static_cast<PAD*>( item )->GetDrillSizeX() > 0; break;
|
||||
default: hasHole = false; break;
|
||||
}
|
||||
|
||||
if( hasHole )
|
||||
{
|
||||
item->SetFlags( HOLE_PROXY );
|
||||
doCheckItem( item );
|
||||
|
|
Loading…
Reference in New Issue