7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-20 00:21:31 +00:00

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.
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;
break;