From 3a8ad7165bd93703e91f690fa7db53cc534dcf88 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 (cherry picked from commit bd51b33f65fe63e12e96f4ad3106b165920cd68e) --- 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 cb31d76bdf..4154741823 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -697,6 +697,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* { @@ -820,7 +824,7 @@ void PAD_TOOL::recombinePad( PAD* aPad ) commit.Remove( fpShape ); } - commit.Push(_("Recombine pads") ); + commit.Push( _( "Recombine pads" ) ); }