diff --git a/pcbnew/api/api_handler_pcb.cpp b/pcbnew/api/api_handler_pcb.cpp index 1a1f8f95d2..8e7b5781f0 100644 --- a/pcbnew/api/api_handler_pcb.cpp +++ b/pcbnew/api/api_handler_pcb.cpp @@ -478,7 +478,7 @@ HANDLER_RESULT API_HANDLER_PCB::handleCreateUpdateItemsIntern { BOARD_ITEM* boardItem = *optItem; commit->Modify( boardItem ); - boardItem->SwapItemData( item.get() ); + *boardItem = *item; boardItem->Serialize( newItem ); }