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:
parent
5ee61f5ae7
commit
b93382831c
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue