Fix accidental logic change to BOARD::InsertArea

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4474
This commit is contained in:
Jon Evans 2020-06-06 15:23:58 -04:00
parent eef81e84b2
commit 94cd0cf3ad
1 changed files with 1 additions and 1 deletions

View File

@ -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, ZONE_CONTAINER* BOARD::InsertArea( int aNetcode, int aAreaIdx, PCB_LAYER_ID aLayer, int aCornerX,
int aCornerY, ZONE_HATCH_STYLE aHatch ) 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->SetNetCode( aNetcode );
new_area->SetLayer( aLayer ); new_area->SetLayer( aLayer );