diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 19262508b9..951c16f129 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -1154,7 +1154,11 @@ void SCH_FIELD::SetText( const wxString& aText ) if( m_isNamedVariable ) return; - EDA_TEXT::SetText( aText ); + // Mandatory fields should not have leading or trailing whitespace. + if( IsMandatory() ) + EDA_TEXT::SetText( aText.Strip( wxString::both ) ); + else + EDA_TEXT::SetText( aText ); }