Loading eeschema/dialogs/dialog_eeschema_options.cpp +14 −4 Original line number Original line Diff line number Diff line Loading @@ -58,9 +58,9 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) : templateFieldListCtrl->InsertColumn( 1, col1 ); templateFieldListCtrl->InsertColumn( 1, col1 ); templateFieldListCtrl->InsertColumn( 2, col2 ); templateFieldListCtrl->InsertColumn( 2, col2 ); templateFieldListCtrl->SetColumnWidth( 0, 200 ); templateFieldListCtrl->SetColumnWidth( 0, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); templateFieldListCtrl->SetColumnWidth( 1, 200 ); templateFieldListCtrl->SetColumnWidth( 1, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); templateFieldListCtrl->SetColumnWidth( 2, 75 ); templateFieldListCtrl->SetColumnWidth( 2, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); // Invalid field selected and don't ignore selection events because // Invalid field selected and don't ignore selection events because // they'll be from the user // they'll be from the user Loading Loading @@ -191,7 +191,7 @@ void DIALOG_EESCHEMA_OPTIONS::RefreshTemplateFieldView( void ) void DIALOG_EESCHEMA_OPTIONS::SelectTemplateField( int aItem ) void DIALOG_EESCHEMA_OPTIONS::SelectTemplateField( int aItem ) { { // Only select valid items! // Only select valid items! if( ( aItem < 0 ) || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) if( !selectionValid || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) return; return; // Make sure we select the new item // Make sure we select the new item Loading Loading @@ -225,6 +225,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnAddButtonClick( wxCommandEvent& event ) // Make sure we select the new item // Make sure we select the new item SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); event.Skip(); } } Loading @@ -250,6 +252,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event ) // Make sure after the refresh that the selected item is correct // Make sure after the refresh that the selected item is correct SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); } } event.Skip(); } } void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void ) void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void ) Loading @@ -269,6 +273,9 @@ void DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus( wxFocusEvent& event ) // Update the data + UI // Update the data + UI copyPanelToSelected(); copyPanelToSelected(); RefreshTemplateFieldView(); RefreshTemplateFieldView(); SelectTemplateField( selectedField ); event.Skip(); } } Loading @@ -291,6 +298,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnTemplateFieldSelected( wxListEvent& event ) if( ignoreSelection ) if( ignoreSelection ) { { ignoreSelection = false; ignoreSelection = false; event.Skip(); return; return; } } Loading @@ -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 // If an item was selected, make sure we re-select it, or at least the // same position in the grid // same position in the grid SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); event.Skip(); } } Loading eeschema/dialogs/dialog_eeschema_options_base.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -218,7 +218,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx bSizer6 = new wxBoxSizer( wxVERTICAL ); bSizer6 = new wxBoxSizer( wxVERTICAL ); templateFieldListCtrl = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); 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 ); bSizer6->Add( templateFieldListCtrl, 1, wxALIGN_TOP|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); Loading eeschema/dialogs/dialog_eeschema_options_base.fbp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3536,7 +3536,7 @@ <property name="maximum_size"></property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> <property name="minimize_button">0</property> <property name="minimum_size">220,-1</property> <property name="minimum_size">500,-1</property> <property name="moveable">1</property> <property name="moveable">1</property> <property name="name">templateFieldListCtrl</property> <property name="name">templateFieldListCtrl</property> <property name="pane_border">1</property> <property name="pane_border">1</property> Loading Loading
eeschema/dialogs/dialog_eeschema_options.cpp +14 −4 Original line number Original line Diff line number Diff line Loading @@ -58,9 +58,9 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) : templateFieldListCtrl->InsertColumn( 1, col1 ); templateFieldListCtrl->InsertColumn( 1, col1 ); templateFieldListCtrl->InsertColumn( 2, col2 ); templateFieldListCtrl->InsertColumn( 2, col2 ); templateFieldListCtrl->SetColumnWidth( 0, 200 ); templateFieldListCtrl->SetColumnWidth( 0, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); templateFieldListCtrl->SetColumnWidth( 1, 200 ); templateFieldListCtrl->SetColumnWidth( 1, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); templateFieldListCtrl->SetColumnWidth( 2, 75 ); templateFieldListCtrl->SetColumnWidth( 2, templateFieldListCtrl->GetSize().GetWidth() / 3.5 ); // Invalid field selected and don't ignore selection events because // Invalid field selected and don't ignore selection events because // they'll be from the user // they'll be from the user Loading Loading @@ -191,7 +191,7 @@ void DIALOG_EESCHEMA_OPTIONS::RefreshTemplateFieldView( void ) void DIALOG_EESCHEMA_OPTIONS::SelectTemplateField( int aItem ) void DIALOG_EESCHEMA_OPTIONS::SelectTemplateField( int aItem ) { { // Only select valid items! // Only select valid items! if( ( aItem < 0 ) || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) if( !selectionValid || ( aItem >= templateFieldListCtrl->GetItemCount() ) ) return; return; // Make sure we select the new item // Make sure we select the new item Loading Loading @@ -225,6 +225,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnAddButtonClick( wxCommandEvent& event ) // Make sure we select the new item // Make sure we select the new item SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); event.Skip(); } } Loading @@ -250,6 +252,8 @@ void DIALOG_EESCHEMA_OPTIONS::OnDeleteButtonClick( wxCommandEvent& event ) // Make sure after the refresh that the selected item is correct // Make sure after the refresh that the selected item is correct SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); } } event.Skip(); } } void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void ) void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void ) Loading @@ -269,6 +273,9 @@ void DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus( wxFocusEvent& event ) // Update the data + UI // Update the data + UI copyPanelToSelected(); copyPanelToSelected(); RefreshTemplateFieldView(); RefreshTemplateFieldView(); SelectTemplateField( selectedField ); event.Skip(); } } Loading @@ -291,6 +298,7 @@ void DIALOG_EESCHEMA_OPTIONS::OnTemplateFieldSelected( wxListEvent& event ) if( ignoreSelection ) if( ignoreSelection ) { { ignoreSelection = false; ignoreSelection = false; event.Skip(); return; return; } } Loading @@ -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 // If an item was selected, make sure we re-select it, or at least the // same position in the grid // same position in the grid SelectTemplateField( selectedField ); SelectTemplateField( selectedField ); event.Skip(); } } Loading
eeschema/dialogs/dialog_eeschema_options_base.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -218,7 +218,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx bSizer6 = new wxBoxSizer( wxVERTICAL ); bSizer6 = new wxBoxSizer( wxVERTICAL ); templateFieldListCtrl = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); 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 ); bSizer6->Add( templateFieldListCtrl, 1, wxALIGN_TOP|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 ); Loading
eeschema/dialogs/dialog_eeschema_options_base.fbp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3536,7 +3536,7 @@ <property name="maximum_size"></property> <property name="maximum_size"></property> <property name="min_size"></property> <property name="min_size"></property> <property name="minimize_button">0</property> <property name="minimize_button">0</property> <property name="minimum_size">220,-1</property> <property name="minimum_size">500,-1</property> <property name="moveable">1</property> <property name="moveable">1</property> <property name="name">templateFieldListCtrl</property> <property name="name">templateFieldListCtrl</property> <property name="pane_border">1</property> <property name="pane_border">1</property> Loading