diff --git a/eeschema/dialogs/dialog_field_properties.cpp b/eeschema/dialogs/dialog_field_properties.cpp index 927064c1e7..0e752a6678 100644 --- a/eeschema/dialogs/dialog_field_properties.cpp +++ b/eeschema/dialogs/dialog_field_properties.cpp @@ -280,7 +280,10 @@ bool DIALOG_FIELD_PROPERTIES::TransferDataFromWindow() void DIALOG_FIELD_PROPERTIES::updateText( EDA_TEXT* aText ) { aText->SetTextPos( m_position ); - aText->SetTextSize( wxSize( m_size, m_size ) ); + + if( aText->GetTextWidth() != m_size ) + aText->SetTextSize( wxSize( m_size, m_size ) ); + aText->SetVisible( m_isVisible ); aText->SetTextAngle( m_isVertical ? TEXT_ANGLE_VERT : TEXT_ANGLE_HORIZ ); aText->SetItalic( m_isItalic ); diff --git a/eeschema/dialogs/dialog_lib_text_properties.cpp b/eeschema/dialogs/dialog_lib_text_properties.cpp index 8bfaedd395..e97ac61322 100644 --- a/eeschema/dialogs/dialog_lib_text_properties.cpp +++ b/eeschema/dialogs/dialog_lib_text_properties.cpp @@ -121,7 +121,9 @@ bool DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow() m_graphicText->SetText( m_TextCtrl->GetValue() ); m_graphicText->SetPosition( wxPoint( m_posX.GetValue(), m_posY.GetValue() ) ); - m_graphicText->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) ); + + if( m_textSize.GetValue() != m_graphicText->GetTextWidth() ) + m_graphicText->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) ); m_graphicText->SetTextAngle( m_orientChoice->GetSelection() ? TEXT_ANGLE_VERT : TEXT_ANGLE_HORIZ ); diff --git a/eeschema/dialogs/dialog_text_and_label_properties.cpp b/eeschema/dialogs/dialog_text_and_label_properties.cpp index 07a40a296f..29738594b1 100644 --- a/eeschema/dialogs/dialog_text_and_label_properties.cpp +++ b/eeschema/dialogs/dialog_text_and_label_properties.cpp @@ -350,9 +350,14 @@ bool DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow() return false; } - m_CurrentText->SetLabelSpinStyle( (LABEL_SPIN_STYLE::SPIN) m_TextOrient->GetSelection() ); + LABEL_SPIN_STYLE selectedSpinStyle( + static_cast( m_TextOrient->GetSelection() ) ); - m_CurrentText->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) ); + if( m_CurrentText->GetLabelSpinStyle() != selectedSpinStyle ) + m_CurrentText->SetLabelSpinStyle( selectedSpinStyle ); + + if( m_CurrentText->GetTextWidth() != m_textSize.GetValue() ) + m_CurrentText->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) ); if( m_TextShape ) m_CurrentText->SetShape( (PINSHEETLABEL_SHAPE) m_TextShape->GetSelection() ); @@ -361,15 +366,15 @@ bool DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow() m_CurrentText->SetItalic( ( style & 1 ) ); - if( ( style & 2 ) ) + if( ( style & 2 ) && !m_CurrentText->IsBold() ) { m_CurrentText->SetBold( true ); m_CurrentText->SetTextThickness( GetPenSizeForBold( m_CurrentText->GetTextWidth() ) ); } - else + else if( m_CurrentText->IsBold() ) { m_CurrentText->SetBold( false ); - m_CurrentText->SetTextThickness( 0 ); // Use default pen width + m_CurrentText->SetTextThickness( 0 ); // Use default pen width } m_Parent->UpdateItem( m_CurrentText );