From 8432fb4feaad1740e91fdef6d98d7a3278057e16 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 14 Oct 2023 08:48:22 +0200 Subject: [PATCH] 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 --- pcbnew/dialogs/panel_setup_layers.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_layers.cpp b/pcbnew/dialogs/panel_setup_layers.cpp index ceb49bd691..0710759c88 100644 --- a/pcbnew/dialogs/panel_setup_layers.cpp +++ b/pcbnew/dialogs/panel_setup_layers.cpp @@ -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; }