From 0b526cca1577cf4af09716069a16d52179cc1f65 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 2 Jan 2024 18:00:25 +0000 Subject: [PATCH] Delete tracks when deleting tuning pattern as part of sel. --- pcbnew/tools/edit_tool.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 0a5f1e59d4..7f9cc4ee0b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -2196,9 +2196,14 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut ) } else { - for( BOARD_ITEM* member : static_cast( board_item )->GetItems() ) + PCB_GENERATOR* generator = static_cast( 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 ); }