Fix a typo in reference clearing.

Also fixes an unrelated bug where all values/footprints were getting
reset rather than just the instance versions.

Fixes https://gitlab.com/kicad/code/kicad/issues/8891
This commit is contained in:
Jeff Young 2021-08-22 19:54:42 +01:00
parent 1fa5e43597
commit 3bddadc03d
1 changed files with 4 additions and 4 deletions

View File

@ -784,7 +784,7 @@ void SCH_SYMBOL::UpdateFields( const SCH_SHEET_PATH* aPath, bool aUpdateStyle, b
if( id == REFERENCE_FIELD && aPath )
{
if( aResetOtherFields )
if( aResetRef )
SetRef( aPath, m_part->GetReferenceField().GetText() );
else if( aUpdateRef )
SetRef( aPath, libField->GetText() );
@ -792,14 +792,14 @@ void SCH_SYMBOL::UpdateFields( const SCH_SHEET_PATH* aPath, bool aUpdateStyle, b
else if( id == VALUE_FIELD )
{
if( aResetOtherFields )
SetValue( UnescapeString( m_lib_id.GetLibItemName() ) ); // alias-specific value
SetValue( aPath, UnescapeString( m_lib_id.GetLibItemName() ) ); // alias-specific value
else
SetValue( UnescapeString( libField->GetText() ) );
SetValue( aPath, UnescapeString( libField->GetText() ) );
}
else if( id == FOOTPRINT_FIELD )
{
if( aResetOtherFields || aUpdateOtherFields )
SetFootprint( libField->GetText() );
SetFootprint( aPath, libField->GetText() );
}
else if( id == DATASHEET_FIELD )
{