Don't leave deleted items in group

We filter out ref/value text in copies so we need to remove them from
the copied group (if any) as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15930
This commit is contained in:
Seth Hillbrand 2023-10-23 13:33:16 -07:00
parent 1380feef72
commit fb387a2c09
1 changed files with 1 additions and 0 deletions

View File

@ -169,6 +169,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
// Now delete items, duplicated but not added: // Now delete items, duplicated but not added:
for( BOARD_ITEM* skp_item : skipped_items ) for( BOARD_ITEM* skp_item : skipped_items )
{ {
static_cast<PCB_GROUP*>( clone )->RemoveItem( skp_item );
skp_item->SetParentGroup( nullptr ); skp_item->SetParentGroup( nullptr );
delete skp_item; delete skp_item;
} }