Delete tracks when deleting tuning pattern as part of sel.

This commit is contained in:
Jeff Young 2024-01-02 18:00:25 +00:00
parent ab34ce295f
commit 0b526cca15
1 changed files with 6 additions and 1 deletions

View File

@ -2196,9 +2196,14 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
}
else
{
for( BOARD_ITEM* member : static_cast<PCB_GROUP*>( board_item )->GetItems() )
PCB_GENERATOR* generator = static_cast<PCB_GENERATOR*>( board_item );
for( BOARD_ITEM* member : generator->GetItems() )
commit.Stage( member, CHT_UNGROUP );
for( BOARD_ITEM* member : generator->GetItems() )
commit.Remove( member );
commit.Remove( board_item );
}