Fix IPC API losing custom fields when updating footprints
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <pcb_reference_image.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pcb_track.h>
|
||||
#include <pcb_field.h>
|
||||
#include <pcb_text.h>
|
||||
#include <pcb_textbox.h>
|
||||
#include <zone.h>
|
||||
@@ -60,6 +61,16 @@ std::unique_ptr<BOARD_ITEM> CreateItemForType( KICAD_T aType, BOARD_ITEM_CONTAIN
|
||||
return std::make_unique<PAD>( footprint );
|
||||
}
|
||||
|
||||
case PCB_FIELD_T:
|
||||
{
|
||||
FOOTPRINT* footprint = dynamic_cast<FOOTPRINT*>( aContainer );
|
||||
|
||||
if( !footprint )
|
||||
return nullptr;
|
||||
|
||||
return std::make_unique<PCB_FIELD>( footprint, FIELD_T::USER );
|
||||
}
|
||||
|
||||
case PCB_FOOTPRINT_T:
|
||||
{
|
||||
BOARD* board = dynamic_cast<BOARD*>( aContainer );
|
||||
|
||||
Reference in New Issue
Block a user