From da12746a3a3c92f628127b459172b4d0ffc33c68 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 13 Oct 2023 18:20:07 +0100 Subject: [PATCH] Clear selection before deleting board layers. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15866 (cherry picked from commit 8d3047d6ebb1d29c9d83173e19f7d720cc40b215) --- pcbnew/dialogs/panel_setup_layers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/dialogs/panel_setup_layers.cpp b/pcbnew/dialogs/panel_setup_layers.cpp index 0710759c88..8166a1631c 100644 --- a/pcbnew/dialogs/panel_setup_layers.cpp +++ b/pcbnew/dialogs/panel_setup_layers.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -486,6 +488,8 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow() if( !removedLayers.empty() ) { + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear ); + PCB_LAYER_COLLECTOR collector; for( PCB_LAYER_ID layer_id : removedLayers )