From 507054e9cdce5b2d80701141a90322ab27b4ad9d 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 (Cherry-picked from b8e9544828f19f94dae2159f325cb6a42c66c93d) --- pcbnew/footprint.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index b05a1b3cd2..6f84e7a0a3 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -801,7 +801,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; }