Fix field align settings in dialogs of Eeschema.

This commit is contained in:
Baranovskiy Konstantin 2017-11-10 18:26:48 +02:00 committed by jean-pierre charras
parent 0017c701c7
commit 1412296398
6 changed files with 16 additions and 16 deletions

View File

@ -923,9 +923,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
else
m_FieldHJustifyCtrl->SetSelection( 1 );
if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_BOTTOM )
if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_TOP )
m_FieldVJustifyCtrl->SetSelection( 0 );
else if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_TOP )
else if( field.GetVertJustify() == GR_TEXT_VJUSTIFY_BOTTOM )
m_FieldVJustifyCtrl->SetSelection( 2 );
else
m_FieldVJustifyCtrl->SetSelection( 1 );
@ -1039,9 +1039,9 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
};
static const EDA_TEXT_VJUSTIFY_T vjustify[] = {
GR_TEXT_VJUSTIFY_BOTTOM,
GR_TEXT_VJUSTIFY_TOP,
GR_TEXT_VJUSTIFY_CENTER,
GR_TEXT_VJUSTIFY_TOP
GR_TEXT_VJUSTIFY_BOTTOM
};
field.SetHorizJustify( hjustify[m_FieldHJustifyCtrl->GetSelection()] );

View File

@ -166,13 +166,13 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
wxBoxSizer* bSizerJustification;
bSizerJustification = new wxBoxSizer( wxHORIZONTAL );
wxString m_FieldHJustifyCtrlChoices[] = { _("Align Left"), _("Center"), _("Align Right") };
wxString m_FieldHJustifyCtrlChoices[] = { _("Align Left"), _("Align Center"), _("Align Right") };
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
m_FieldHJustifyCtrl = new wxRadioBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Horizontal Position:"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldHJustifyCtrl->SetSelection( 0 );
bSizerJustification->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxString m_FieldVJustifyCtrlChoices[] = { _("Align Top"), _("Center"), _("Align Bottom") };
wxString m_FieldVJustifyCtrlChoices[] = { _("Align Top"), _("Align Center"), _("Align Bottom") };
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
m_FieldVJustifyCtrl = new wxRadioBox( fieldsSizer->GetStaticBox(), wxID_ANY, _("Vertical Position:"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_FieldVJustifyCtrl->SetSelection( 0 );

View File

@ -2107,7 +2107,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Align Left&quot; &quot;Center&quot; &quot;Align Right&quot;</property>
<property name="choices">&quot;Align Left&quot; &quot;Align Center&quot; &quot;Align Right&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -2197,7 +2197,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Align Top&quot; &quot;Center&quot; &quot;Align Bottom&quot;</property>
<property name="choices">&quot;Align Top&quot; &quot;Align Center&quot; &quot;Align Bottom&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>

View File

@ -100,7 +100,7 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( )
switch ( m_graphicText->GetVertJustify() )
{
case GR_TEXT_VJUSTIFY_BOTTOM:
case GR_TEXT_VJUSTIFY_TOP:
m_TextVJustificationOpt->SetSelection( 0 );
break;
@ -108,7 +108,7 @@ void DIALOG_LIB_EDIT_TEXT::initDlg( )
m_TextVJustificationOpt->SetSelection( 1 );
break;
case GR_TEXT_VJUSTIFY_TOP:
case GR_TEXT_VJUSTIFY_BOTTOM:
m_TextVJustificationOpt->SetSelection( 2 );
break;
}
@ -199,7 +199,7 @@ void DIALOG_LIB_EDIT_TEXT::OnOkClick( wxCommandEvent& event )
switch( m_TextVJustificationOpt->GetSelection() )
{
case 0:
m_graphicText->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM );
m_graphicText->SetVertJustify( GR_TEXT_VJUSTIFY_TOP );
break;
case 1:
@ -207,7 +207,7 @@ void DIALOG_LIB_EDIT_TEXT::OnOkClick( wxCommandEvent& event )
break;
case 2:
m_graphicText->SetVertJustify( GR_TEXT_VJUSTIFY_TOP );
m_graphicText->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM );
break;
}
}

View File

@ -98,13 +98,13 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
m_TextShapeOpt->SetSelection( 0 );
bBottomtBoxSizer->Add( m_TextShapeOpt, 1, wxALL|wxEXPAND, 5 );
wxString m_TextHJustificationOptChoices[] = { _("Align left"), _("Align center"), _("Align right") };
wxString m_TextHJustificationOptChoices[] = { _("Align Left"), _("Align Center"), _("Align Right") };
int m_TextHJustificationOptNChoices = sizeof( m_TextHJustificationOptChoices ) / sizeof( wxString );
m_TextHJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Horizontal Justify"), wxDefaultPosition, wxDefaultSize, m_TextHJustificationOptNChoices, m_TextHJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
m_TextHJustificationOpt->SetSelection( 1 );
bBottomtBoxSizer->Add( m_TextHJustificationOpt, 1, wxALL|wxEXPAND, 5 );
wxString m_TextVJustificationOptChoices[] = { _("Align bottom"), _("Align center"), _("Align top") };
wxString m_TextVJustificationOptChoices[] = { _("Align Top"), _("Align Center"), _("Align Bottom") };
int m_TextVJustificationOptNChoices = sizeof( m_TextVJustificationOptChoices ) / sizeof( wxString );
m_TextVJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Vertical Justify"), wxDefaultPosition, wxDefaultSize, m_TextVJustificationOptNChoices, m_TextVJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
m_TextVJustificationOpt->SetSelection( 1 );

View File

@ -1230,7 +1230,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Align left&quot; &quot;Align center&quot; &quot;Align right&quot;</property>
<property name="choices">&quot;Align Left&quot; &quot;Align Center&quot; &quot;Align Right&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -1320,7 +1320,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Align bottom&quot; &quot;Align center&quot; &quot;Align top&quot;</property>
<property name="choices">&quot;Align Top&quot; &quot;Align Center&quot; &quot;Align Bottom&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>