Check for layer when DRC on vias and non-zone items
We were already checking for zone-zone overlap but missing checks when running against (possibly) buried vias as well as the general check Fixes https://gitlab.com/kicad/code/kicad/issues/9366
This commit is contained in:
parent
8dbe60b0d5
commit
58f553a9ca
|
@ -474,6 +474,8 @@ bool calcIsInsideArea( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox, PCB_EXPR_CO
|
|||
PCB_VIA* via = static_cast<PCB_VIA*>( aItem );
|
||||
const SHAPE_CIRCLE holeShape( via->GetPosition(), via->GetDrillValue() );
|
||||
|
||||
/// Avoid buried vias that don't overlap the zone's layers
|
||||
if( ( via->GetLayerSet() & aArea->GetLayerSet() ).any() )
|
||||
return areaOutline.Collide( &holeShape );
|
||||
}
|
||||
|
||||
|
@ -555,6 +557,9 @@ bool calcIsInsideArea( BOARD_ITEM* aItem, const EDA_RECT& aItemBBox, PCB_EXPR_CO
|
|||
}
|
||||
else
|
||||
{
|
||||
if( !( aArea->GetLayerSet().Contains( aCtx->GetLayer() ) ) )
|
||||
return false;
|
||||
|
||||
if( !shape )
|
||||
shape = aItem->GetEffectiveShape( aCtx->GetLayer() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue