From 0ca76571ce8dbebebe7bb07f510861025cd4eb7f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 7 Feb 2021 11:11:00 +0000 Subject: [PATCH] Add footprint zones to paste routine. Fixes https://gitlab.com/kicad/code/kicad/issues/7442 --- pcbnew/tools/pcb_control.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 33aa1c911d..b894770a3c 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -594,6 +594,14 @@ static void pasteFootprintItemsToFootprintEditor( FOOTPRINT* aClipFootprint, BOA aClipFootprint->GraphicalItems().clear(); + for( FP_ZONE* zone : aClipFootprint->Zones() ) + { + zone->SetParent( editorFootprint ); + aPastedItems.push_back( zone ); + } + + aClipFootprint->Zones().clear(); + for( PCB_GROUP* group : aClipFootprint->Groups() ) { group->SetParent( editorFootprint );