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