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 );
|
||||
|
||||
@@ -536,6 +536,19 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(property "CustomField" "CustomValue"
|
||||
(at 0 0 0)
|
||||
(unlocked yes)
|
||||
(layer "F.Fab")
|
||||
(hide yes)
|
||||
(uuid "212d694f-e13b-46df-9a52-6773137fcf6d")
|
||||
(effects
|
||||
(font
|
||||
(size 1 1)
|
||||
(thickness 0.15)
|
||||
)
|
||||
)
|
||||
)
|
||||
(attr through_hole)
|
||||
(fp_line
|
||||
(start -5.08 3.81)
|
||||
|
||||
Reference in New Issue
Block a user