Clear selection before deleting board layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15866

(cherry picked from commit 8d3047d6eb)
This commit is contained in:
Jeff Young 2023-10-13 18:20:07 +01:00
parent b023019b0d
commit da12746a3a
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,8 @@
#include <core/kicad_algo.h>
#include <pcbnew.h>
#include <pcb_edit_frame.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <board.h>
#include <collectors.h>
#include <footprint.h>
@ -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 )