From 65450d9b5d3a187b96016c804d02be4a5b3a8d71 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Mon, 31 Jul 2023 15:09:55 -0400 Subject: [PATCH] Fields: don't unchanged fields as changed --- pcbnew/netlist_reader/board_netlist_updater.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcbnew/netlist_reader/board_netlist_updater.cpp b/pcbnew/netlist_reader/board_netlist_updater.cpp index e03d9e6d31..f7f9da487a 100644 --- a/pcbnew/netlist_reader/board_netlist_updater.cpp +++ b/pcbnew/netlist_reader/board_netlist_updater.cpp @@ -346,7 +346,13 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint, std::map fpFieldsAsMap; for( PCB_FIELD* field : aPcbFootprint->GetFields() ) + { + // These fields are individually checked above, and are not currently present in (fields) anyway. + if( field->IsReference() || field->IsValue() || field->IsFootprint() ) + continue; + fpFieldsAsMap[field->GetName()] = field->GetText(); + } if( fpFieldsAsMap != aNetlistComponent->GetFields() ) { @@ -396,6 +402,9 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint, if( aNetlistComponent->GetFields().count( field->GetName() ) == 0 ) aPcbFootprint->RemoveField( field->GetCanonicalName() ); + + if( m_frame ) + m_frame->GetCanvas()->GetView()->Remove( field ); } }