Symbol editor, DIALOG_FIELD_PROPERTIES: fix missing initialization of font.

In Symbol editor, trying to change the font of a field did nothing.
From master branch
This commit is contained in:
jean-pierre charras 2023-07-18 18:40:53 +02:00
parent 3fc404cd25
commit cc2637b310
1 changed files with 3 additions and 2 deletions

View File

@ -419,6 +419,7 @@ void DIALOG_FIELD_PROPERTIES::updateText( EDA_TEXT* aText )
if( aText->GetTextWidth() != m_size ) if( aText->GetTextWidth() != m_size )
aText->SetTextSize( wxSize( m_size, m_size ) ); aText->SetTextSize( wxSize( m_size, m_size ) );
aText->SetFont( m_font );
aText->SetVisible( m_isVisible ); aText->SetVisible( m_isVisible );
aText->SetTextAngle( m_isVertical ? ANGLE_VERTICAL : ANGLE_HORIZONTAL ); aText->SetTextAngle( m_isVertical ? ANGLE_VERTICAL : ANGLE_HORIZONTAL );
aText->SetItalic( m_isItalic ); aText->SetItalic( m_isItalic );
@ -439,6 +440,8 @@ DIALOG_LIB_FIELD_PROPERTIES::DIALOG_LIB_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
if( m_fieldId == VALUE_FIELD ) if( m_fieldId == VALUE_FIELD )
m_text = UnescapeString( aField->GetText() ); m_text = UnescapeString( aField->GetText() );
m_font = aField->GetFont();
m_nameVisible->Show(); m_nameVisible->Show();
m_cbAllowAutoPlace->Show(); m_cbAllowAutoPlace->Show();
@ -688,8 +691,6 @@ void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH
updateText( aField ); updateText( aField );
aField->SetPosition( m_position ); aField->SetPosition( m_position );
aField->SetFont( m_font );
aField->SetNameShown( m_isNameVisible ); aField->SetNameShown( m_isNameVisible );
aField->SetCanAutoplace( m_allowAutoplace ); aField->SetCanAutoplace( m_allowAutoplace );