BOARD_NETLIST_UPDATER: fix issue when reading net-lists having no FOOTPRINT_FIELD
they can be old net-lists or non Kicad net-lists. Fixes #16931 https://gitlab.com/kicad/code/kicad/-/issues/16931
This commit is contained in:
parent
d6fb362bd1
commit
fe1579ebbd
|
@ -320,8 +320,16 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||
if( ( m_replaceFootprints || ( aPcbFootprint->GetAttributes() & FP_JUST_ADDED ) )
|
||||
&& !m_isDryRun )
|
||||
{
|
||||
aPcbFootprint->Footprint().SetText(
|
||||
// Update FOOTPRINT_FIELD (if exists in the netlist)
|
||||
try
|
||||
{
|
||||
aPcbFootprint->Footprint().SetText(
|
||||
aNetlistComponent->GetFields()[GetCanonicalFieldName( FOOTPRINT_FIELD )] );
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
// If not exist (old netlist), just skip it: What else?
|
||||
}
|
||||
}
|
||||
|
||||
// Test for time stamp change.
|
||||
|
|
Loading…
Reference in New Issue