From fb387a2c0971efb5aa614f8dcd6120c1c1461d91 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 23 Oct 2023 13:33:16 -0700 Subject: [PATCH] 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 --- pcbnew/kicad_clipboard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index 450b790e7c..5463bf231d 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -169,6 +169,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri // Now delete items, duplicated but not added: for( BOARD_ITEM* skp_item : skipped_items ) { + static_cast( clone )->RemoveItem( skp_item ); skp_item->SetParentGroup( nullptr ); delete skp_item; }