PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.

Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
From Master branch
This commit is contained in:
jean-pierre charras 2023-07-12 12:47:36 +02:00
parent 10efb6e55a
commit d268ccea5b
2 changed files with 9 additions and 0 deletions

View File

@ -534,6 +534,10 @@ void PCB_VIA::SetLayerSet( LSET aLayerSet )
for( PCB_LAYER_ID layer : aLayerSet.Seq() )
{
// m_layer and m_bottomLayer are copper layers, so consider only copper layers in aLayerSet
if( !IsCopperLayer( layer ) )
continue;
if( first )
{
m_layer = layer;

View File

@ -412,6 +412,11 @@ public:
bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
virtual LSET GetLayerSet() const override;
/**
* Note SetLayerSet() initialize the first and last copper layers connected by the via.
* So currently SetLayerSet ignore non copper layers
*/
virtual void SetLayerSet( LSET aLayers ) override;
/**