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 b8e9544828)
This commit is contained in:
Ian McInerney 2023-06-24 00:03:06 +01:00
parent 342b8b157b
commit 507054e9cd
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}