From b8e9544828f19f94dae2159f325cb6a42c66c93d Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sat, 24 Jun 2023 00:03:06 +0100 Subject: [PATCH] Remove temporary footprint from pcb group before deletion Bounding box computation uses a temporary footprint, but the clone operation keeps the group information. We can't delete a footprint if it has group information, so just delete the group information. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14909 --- pcbnew/footprint.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 79c3b24341..e01b5a9a1e 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -939,7 +939,9 @@ BOX2I FOOTPRINT::GetFpPadsLocalBbox() const for( PAD* pad : dummy.Pads() ) bbox.Merge( pad->GetBoundingBox() ); + // Remove the parent and the group from the dummy footprint before deletion dummy.SetParent( nullptr ); + dummy.SetParentGroup( nullptr ); return bbox; }