Fix is-same logic in updateFootprintParameters.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19988
This commit is contained in:
Jeff Young 2025-03-15 18:41:48 +00:00
parent f33f10bb38
commit f9b19bbb5b

View File

@ -481,9 +481,18 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
// in the order they are stored in the symbol. // in the order they are stored in the symbol.
bool same = true; bool same = true;
for( std::pair<wxString, wxString> field : compFields ) for( const auto& [name, value] : compFields )
{ {
if( fpFieldsAsMap.count( field.first ) == 0 || fpFieldsAsMap[field.first] != field.second ) if( fpFieldsAsMap.count( name ) == 0 || fpFieldsAsMap[name] != value )
{
same = false;
break;
}
}
for( const auto& [name, value] : fpFieldsAsMap )
{
if( compFields.count( name ) == 0 )
{ {
same = false; same = false;
break; break;