pcbnew: Ensure connectivity layers are respected
This prevents non-copper layers from being included in the connectivity
search. It also limits the layer search in the connectivity RTree to
just the copper layer range.
(cherry picked from commit f87cb64d65
)
This commit is contained in:
parent
4f2f8e7f67
commit
dd7ce9f00a
|
@ -233,6 +233,9 @@ void CN_CONNECTIVITY_ALGO::markItemNetAsDirty( const BOARD_ITEM* aItem )
|
|||
|
||||
bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
||||
{
|
||||
if( !IsCopperLayer( aItem->GetLayer() ) )
|
||||
return false;
|
||||
|
||||
markItemNetAsDirty ( aItem );
|
||||
|
||||
switch( aItem->Type() )
|
||||
|
|
|
@ -555,7 +555,7 @@ public:
|
|||
{
|
||||
auto item = new CN_ITEM( pad, false, 1 );
|
||||
item->AddAnchor( pad->ShapePos() );
|
||||
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
|
||||
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
|
||||
|
||||
switch( pad->GetAttribute() )
|
||||
{
|
||||
|
@ -573,6 +573,7 @@ public:
|
|||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@ -602,7 +603,7 @@ public:
|
|||
|
||||
m_items.push_back( item );
|
||||
item->AddAnchor( via->GetStart() );
|
||||
item->SetLayers( LAYER_RANGE( 0, PCB_LAYER_ID_COUNT ) );
|
||||
item->SetLayers( LAYER_RANGE( F_Cu, B_Cu ) );
|
||||
addItemtoTree( item );
|
||||
SetDirty();
|
||||
return item;
|
||||
|
|
Loading…
Reference in New Issue