Eeschema: remove a strange test that modified the reference position.

For some reason, when the reference was empty, the position was changed
without a good reason. (It happens in the SCH_COMPONENT ctor).
Fixes #8230
https://gitlab.com/kicad/code/kicad/issues/8230
This commit is contained in:
jean-pierre charras 2021-04-18 11:27:05 +02:00
parent 6425ad4118
commit 8967e7eb3e
1 changed files with 0 additions and 9 deletions

View File

@ -491,15 +491,6 @@ void SCH_COMPONENT::SetRef( const SCH_SHEET_PATH* sheet, const wxString& ref )
SCH_FIELD* rf = GetField( REFERENCE_FIELD );
// @todo Should we really be checking for what is a "reasonable" position?
if( rf->GetText().IsEmpty()
|| ( abs( rf->GetTextPos().x - m_pos.x ) +
abs( rf->GetTextPos().y - m_pos.y ) > Mils2iu( 10000 ) ) )
{
// move it to a reasonable position
rf->SetTextPos( m_pos + wxPoint( Mils2iu( 50 ), Mils2iu( 50 ) ) );
}
rf->SetText( ref ); // for drawing.
// Reinit the m_prefix member if needed