Eeschema: place new field near parent component

For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.

(cherry picked from commit 11f03c8551)
This commit is contained in:
Baranovskiy Konstantin 2019-03-26 22:14:51 +02:00 committed by John Beard
parent 5ee61f5ae7
commit b93382831c
1 changed files with 1 additions and 1 deletions

View File

@ -604,7 +604,7 @@ public:
SCH_FIELD* destField = comp->FindField( srcName ); SCH_FIELD* destField = comp->FindField( srcName );
if( !destField && !srcValue.IsEmpty() ) if( !destField && !srcValue.IsEmpty() )
destField = comp->AddField( SCH_FIELD( wxPoint( 0, 0 ), -1, comp, srcName ) ); destField = comp->AddField( SCH_FIELD( comp->GetPosition(), -1, comp, srcName ) );
if( destField && !srcValue.IsEmpty() ) if( destField && !srcValue.IsEmpty() )
destField->SetText( srcValue ); destField->SetText( srcValue );