Use fileds from flattened lib symbol when updating.

Fixes https://gitlab.com/kicad/code/kicad/issues/14577

(cherry picked from commit d816fb071f)
This commit is contained in:
Jeff Young 2023-04-26 12:46:50 +01:00
parent c10fe673a2
commit cd9196ddb9
1 changed files with 3 additions and 3 deletions

View File

@ -611,9 +611,9 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( const std::map<SCH_SYMBOL*,
continue;
if( i < MANDATORY_FIELDS )
libField = libSymbol->GetFieldById( (int) i );
libField = symbol->GetLibSymbolRef()->GetFieldById( (int) i );
else
libField = libSymbol->FindField( field.GetName() );
libField = symbol->GetLibSymbolRef()->FindField( field.GetName() );
if( libField )
{
@ -672,7 +672,7 @@ int DIALOG_CHANGE_SYMBOLS::processSymbols( const std::map<SCH_SYMBOL*,
}
std::vector<LIB_FIELD*> libFields;
libSymbol->GetFields( libFields );
symbol->GetLibSymbolRef()->GetFields( libFields );
for( unsigned i = MANDATORY_FIELDS; i < libFields.size(); ++i )
{