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

View File

@ -939,7 +939,9 @@ BOX2I FOOTPRINT::GetFpPadsLocalBbox() const
for( PAD* pad : dummy.Pads() ) for( PAD* pad : dummy.Pads() )
bbox.Merge( pad->GetBoundingBox() ); bbox.Merge( pad->GetBoundingBox() );
// Remove the parent and the group from the dummy footprint before deletion
dummy.SetParent( nullptr ); dummy.SetParent( nullptr );
dummy.SetParentGroup( nullptr );
return bbox; return bbox;
} }