eeschema: do not propagate text field change to other units for not annotated symbols

Fixes #4602
https://gitlab.com/kicad/code/kicad/issues/4602
This commit is contained in:
jean-pierre charras 2020-06-03 08:52:48 +02:00
parent b681af4556
commit e099a82d15
1 changed files with 14 additions and 11 deletions

View File

@ -312,8 +312,10 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH*
&& ( fieldType == VALUE || fieldType == FOOTPRINT || fieldType == DATASHEET ) ) && ( fieldType == VALUE || fieldType == FOOTPRINT || fieldType == DATASHEET ) )
{ {
const wxString thisRef = component->GetRef( &( editFrame->GetCurrentSheet() ) ); const wxString thisRef = component->GetRef( &( editFrame->GetCurrentSheet() ) );
int thisUnit = component->GetUnit();
if( thisRef.Last() != '?' ) // Obvioulsy, the component must be annotated
{
int thisUnit = component->GetUnit();
SCH_REFERENCE_LIST components; SCH_REFERENCE_LIST components;
editFrame->GetCurrentSheet().GetComponents( components ); editFrame->GetCurrentSheet().GetComponents( components );
@ -330,6 +332,7 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH*
} }
} }
} }
}
if( component && positioningModified ) if( component && positioningModified )
component->ClearFieldsAutoplaced(); component->ClearFieldsAutoplaced();