diff --git a/eeschema/dialogs/dialog_eeschema_options.cpp b/eeschema/dialogs/dialog_eeschema_options.cpp index 21e14ddc8e..10d2df9a31 100644 --- a/eeschema/dialogs/dialog_eeschema_options.cpp +++ b/eeschema/dialogs/dialog_eeschema_options.cpp @@ -58,9 +58,9 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) : templateFieldListCtrl->InsertColumn( 1, col1 ); templateFieldListCtrl->InsertColumn( 2, col2 ); - templateFieldListCtrl->SetColumnWidth( 0, 200 ); - templateFieldListCtrl->SetColumnWidth( 1, 200 ); - templateFieldListCtrl->SetColumnWidth( 2, 75 ); + templateFieldListCtrl->SetColumnWidth( 0, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); + templateFieldListCtrl->SetColumnWidth( 1, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); + templateFieldListCtrl->SetColumnWidth( 2, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); // Invalid field selected and don't ignore selection events because // they'll be from the user @@ -191,7 +191,7 @@ void DIALOG_EESCHEMA_OPTIONS::RefreshTemplateFieldView( void ) void DIALOG_EESCHEMA_OPTIONS::SelectTemplateField( int aItem ) { // Only select valid items! - if( ( aItem < 0 ) || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) + if( !selectionValid || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) return; // Make sure we select the new item @@ -225,6 +225,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnAddButtonClick( wxCommandEvent& event ) // Make sure we select the new item SelectTemplateField( selectedField ); + + event.Skip(); } @@ -250,6 +252,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event ) // Make sure after the refresh that the selected item is correct SelectTemplateField( selectedField ); } + + event.Skip(); } void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void ) @@ -269,6 +273,9 @@ void DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus( wxFocusEvent& event ) // Update the data + UI copyPanelToSelected(); RefreshTemplateFieldView(); + SelectTemplateField( selectedField ); + + event.Skip(); } @@ -291,6 +298,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnTemplateFieldSelected( wxListEvent& event ) if( ignoreSelection ) { ignoreSelection = false; + event.Skip(); return; } @@ -312,6 +320,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnTemplateFieldSelected( wxListEvent& event ) // If an item was selected, make sure we re-select it, or at least the // same position in the grid SelectTemplateField( selectedField ); + + event.Skip(); } diff --git a/eeschema/dialogs/dialog_eeschema_options_base.cpp b/eeschema/dialogs/dialog_eeschema_options_base.cpp index 1600c43ed3..cbe1dbe6dc 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.cpp +++ b/eeschema/dialogs/dialog_eeschema_options_base.cpp @@ -218,7 +218,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx bSizer6 = new wxBoxSizer( wxVERTICAL ); templateFieldListCtrl = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); - templateFieldListCtrl->SetMinSize( wxSize( 220,-1 ) ); + templateFieldListCtrl->SetMinSize( wxSize( 500,-1 ) ); bSizer6->Add( templateFieldListCtrl, 1, wxALIGN_TOP|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); diff --git a/eeschema/dialogs/dialog_eeschema_options_base.fbp b/eeschema/dialogs/dialog_eeschema_options_base.fbp index a8db4f6c6f..493e01eed1 100644 --- a/eeschema/dialogs/dialog_eeschema_options_base.fbp +++ b/eeschema/dialogs/dialog_eeschema_options_base.fbp @@ -3536,7 +3536,7 @@ 0 - 220,-1 + 500,-1 1 templateFieldListCtrl 1