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:
parent
1fa5e43597
commit
3bddadc03d
|
@ -784,7 +784,7 @@ void SCH_SYMBOL::UpdateFields( const SCH_SHEET_PATH* aPath, bool aUpdateStyle, b
|
||||||
|
|
||||||
if( id == REFERENCE_FIELD && aPath )
|
if( id == REFERENCE_FIELD && aPath )
|
||||||
{
|
{
|
||||||
if( aResetOtherFields )
|
if( aResetRef )
|
||||||
SetRef( aPath, m_part->GetReferenceField().GetText() );
|
SetRef( aPath, m_part->GetReferenceField().GetText() );
|
||||||
else if( aUpdateRef )
|
else if( aUpdateRef )
|
||||||
SetRef( aPath, libField->GetText() );
|
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 )
|
else if( id == VALUE_FIELD )
|
||||||
{
|
{
|
||||||
if( aResetOtherFields )
|
if( aResetOtherFields )
|
||||||
SetValue( UnescapeString( m_lib_id.GetLibItemName() ) ); // alias-specific value
|
SetValue( aPath, UnescapeString( m_lib_id.GetLibItemName() ) ); // alias-specific value
|
||||||
else
|
else
|
||||||
SetValue( UnescapeString( libField->GetText() ) );
|
SetValue( aPath, UnescapeString( libField->GetText() ) );
|
||||||
}
|
}
|
||||||
else if( id == FOOTPRINT_FIELD )
|
else if( id == FOOTPRINT_FIELD )
|
||||||
{
|
{
|
||||||
if( aResetOtherFields || aUpdateOtherFields )
|
if( aResetOtherFields || aUpdateOtherFields )
|
||||||
SetFootprint( libField->GetText() );
|
SetFootprint( aPath, libField->GetText() );
|
||||||
}
|
}
|
||||||
else if( id == DATASHEET_FIELD )
|
else if( id == DATASHEET_FIELD )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue