From cc2637b310cd217165aa021747015366bd6495e2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 18 Jul 2023 18:40:53 +0200 Subject: [PATCH] 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 --- eeschema/dialogs/dialog_field_properties.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_field_properties.cpp b/eeschema/dialogs/dialog_field_properties.cpp index b2fb65a44f..5ec7358ede 100644 --- a/eeschema/dialogs/dialog_field_properties.cpp +++ b/eeschema/dialogs/dialog_field_properties.cpp @@ -419,6 +419,7 @@ void DIALOG_FIELD_PROPERTIES::updateText( EDA_TEXT* aText ) if( aText->GetTextWidth() != m_size ) aText->SetTextSize( wxSize( m_size, m_size ) ); + aText->SetFont( m_font ); aText->SetVisible( m_isVisible ); aText->SetTextAngle( m_isVertical ? ANGLE_VERTICAL : ANGLE_HORIZONTAL ); 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 ) m_text = UnescapeString( aField->GetText() ); + m_font = aField->GetFont(); + m_nameVisible->Show(); m_cbAllowAutoPlace->Show(); @@ -688,8 +691,6 @@ void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH updateText( aField ); aField->SetPosition( m_position ); - aField->SetFont( m_font ); - aField->SetNameShown( m_isNameVisible ); aField->SetCanAutoplace( m_allowAutoplace );