diff --git a/pcbnew/connectivity/connectivity_data.cpp b/pcbnew/connectivity/connectivity_data.cpp index 7f54e79dca..9d195ea9b3 100644 --- a/pcbnew/connectivity/connectivity_data.cpp +++ b/pcbnew/connectivity/connectivity_data.cpp @@ -378,7 +378,7 @@ void CONNECTIVITY_DATA::PropagateNets( BOARD_COMMIT* aCommit, PROPAGATE_MODE aMo bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, int aLayer, - std::vector aTypes ) const + std::vector aTypes, bool aIgnoreNets ) const { CN_CONNECTIVITY_ALGO::ITEM_MAP_ENTRY &entry = m_connAlgo->ItemEntry( aItem ); @@ -397,7 +397,7 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i { if( connected->Valid() && connected->Layers().Overlaps( aLayer ) - && connected->Net() == aItem->GetNetCode() + && ( connected->Net() == aItem->GetNetCode() || aIgnoreNets ) && matchType( connected->Parent()->Type() ) ) { return true; diff --git a/pcbnew/connectivity/connectivity_data.h b/pcbnew/connectivity/connectivity_data.h index b2eb377a11..4095027667 100644 --- a/pcbnew/connectivity/connectivity_data.h +++ b/pcbnew/connectivity/connectivity_data.h @@ -201,7 +201,8 @@ public: unsigned int GetUnconnectedCount() const; bool IsConnectedOnLayer( const BOARD_CONNECTED_ITEM* aItem, - int aLayer, std::vector aTypes = {} ) const; + int aLayer, std::vector aTypes = {}, + bool aIgnoreNets = false ) const; unsigned int GetNodeCount( int aNet = -1 ) const; diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index 66fe9ff2c7..d977fa5125 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -237,7 +237,7 @@ bool PAD::FlashLayer( int aLayer ) const return board && board->GetConnectivity()->IsConnectedOnLayer( this, static_cast( aLayer ), - types ); + types, true ); case PAD_ATTRIB::NPTH: if( GetShape() == PAD_SHAPE::CIRCLE && GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )