From bd51b33f65fe63e12e96f4ad3106b165920cd68e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 2 Jun 2022 15:55:16 +0100 Subject: [PATCH] Clear point editor before recombining pad. Fixes https://gitlab.com/kicad/code/kicad/issues/11731 --- pcbnew/tools/pad_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp index af78891f94..a140e911c8 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -699,6 +699,10 @@ void PAD_TOOL::recombinePad( PAD* aPad ) { int maxError = board()->GetDesignSettings().m_MaxError; + // Don't leave an object in the point editor that might no longer exist after + // recombining the pad. + m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); + auto findNext = [&]( PCB_LAYER_ID aLayer ) -> FP_SHAPE* { @@ -822,7 +826,7 @@ void PAD_TOOL::recombinePad( PAD* aPad ) commit.Remove( fpShape ); } - commit.Push(_("Recombine pads") ); + commit.Push( _( "Recombine pads" ) ); }