From 94cd0cf3adda13eda71503c76392d44fd1ad0971 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 6 Jun 2020 15:23:58 -0400 Subject: [PATCH] Fix accidental logic change to BOARD::InsertArea Fixes https://gitlab.com/kicad/code/kicad/-/issues/4474 --- pcbnew/class_board.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 76fff1be52..e8d4a642cb 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1643,7 +1643,7 @@ void BOARD::RemoveArea( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_to ZONE_CONTAINER* BOARD::InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer, int aCornerX, int aCornerY, ZONE_HATCH_STYLE aHatch ) { - ZONE_CONTAINER* new_area = (ZONE_CONTAINER*) this->Duplicate(); + ZONE_CONTAINER* new_area = new ZONE_CONTAINER( this ); new_area->SetNetCode( aNetcode ); new_area->SetLayer( aLayer );