Eeschema: fix wrong position of symbol fields when adding a symbol in a schematic

Fixes: lp:1665718
https://bugs.launchpad.net/kicad/+bug/1665718
This commit is contained in:
jean-pierre charras 2017-03-12 17:04:42 +01:00
parent 5e5259b59c
commit 28a6ca1e23
1 changed files with 3 additions and 1 deletions

View File

@ -172,9 +172,11 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* sheet, int unit,
schField = AddField( fld );
}
schField->SetTextPos( m_Pos + it->GetTextPos() );
schField->ImportValues( *it );
schField->SetText( it->GetText() );
// Now the field is initialized, place it to the right position:
schField->SetTextPos( m_Pos + it->GetTextPos() );
}
wxString msg = aPart.GetReferenceField().GetText();