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.
This commit is contained in:
Baranovskiy Konstantin 2019-03-26 22:14:51 +02:00 committed by John Beard
parent 9e5bc5d2d3
commit 11f03c8551
1 changed files with 1 additions and 1 deletions

View File

@ -604,7 +604,7 @@ public:
SCH_FIELD* destField = comp->FindField( srcName );
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() )
destField->SetText( srcValue );