diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 6a9f79509e..1063b852aa 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -1295,14 +1295,15 @@ void NODE::KillChildren() } -void NODE::AllItemsInNet( int aNet, std::set& aItems ) +void NODE::AllItemsInNet( int aNet, std::set& aItems, int aKindMask) { INDEX::NET_ITEMS_LIST* l_cur = m_index->GetItemsForNet( aNet ); if( l_cur ) { for( ITEM*item : *l_cur ) - aItems.insert( item ); + if( item->OfKind( aKindMask ) ) + aItems.insert( item ); } if( !isRoot() ) @@ -1311,7 +1312,7 @@ void NODE::AllItemsInNet( int aNet, std::set& aItems ) if( l_root ) for( INDEX::NET_ITEMS_LIST::iterator i = l_root->begin(); i!= l_root->end(); ++i ) - if( !Overrides( *i ) ) + if( !Overrides( *i ) && (*i)->OfKind( aKindMask )) aItems.insert( *i ); } } diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index 687de7c5a3..8ad3cc92b0 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -410,7 +410,7 @@ public: ///> Destroys all child nodes. Applicable only to the root node. void KillChildren(); - void AllItemsInNet( int aNet, std::set& aItems ); + void AllItemsInNet( int aNet, std::set& aItems, int aKindMask = -1 ); void ClearRanks( int aMarkerMask = MK_HEAD | MK_VIOLATION );