Pcbnew: when adding layers, do not change via layers.

Via layers are not defined by a LSET, and the code that used the new LSET
broke the Via start and/or end layers (for blind/buried vias)
From master branch
Fixes #15856
https://gitlab.com/kicad/code/kicad/-/issues/15856
This commit is contained in:
jean-pierre charras 2023-10-14 08:48:22 +02:00
parent 84df2c86ae
commit 8432fb4fea
1 changed files with 4 additions and 5 deletions

View File

@ -545,11 +545,10 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
}
}
for( PCB_TRACK* via : m_pcb->Tracks() )
{
if( via->HasHole() )
via->SetLayerSet( via->GetLayerSet() | LSET::InternalCuMask() );
}
// Tracks do not change their layer
// Vias layers are defined by the starting layer and the ending layer, so
// they are not modified by adding a layer.
// So do nothing for tracks/vias
modified = true;
}