Loading eeschema/dialog_eeschema_config.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -294,10 +294,10 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) m_ListLibr->GetSelections(selections); ii = selections.GetCount(); if( ii <= 0 && event.GetId() != ID_ADD_LIB ) ii = 0; else if( ii > 0 ) ii = selections[0]; else ii = 0; wxString libpath; libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); Loading eeschema/dialog_eeschema_config_fbp.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind m_ListLibr->SetToolTip( _("List of active library files.\nOnly library files in this list are loaded by Eeschema.\nThe order of this list is important:\nEeschema searchs for a given component using this list order priority.") ); m_ListLibr->SetMinSize( wxSize( 400,250 ) ); sbLibsChoiceSizer->Add( m_ListLibr, 1, wxALL|wxEXPAND, 5 ); sbLibsChoiceSizer->Add( m_ListLibr, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bRightSizer; bRightSizer = new wxBoxSizer( wxVERTICAL ); Loading Loading @@ -60,7 +60,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") ); m_listUserPaths->SetMinSize( wxSize( 400,90 ) ); sbSizer4->Add( m_listUserPaths, 1, wxALL|wxEXPAND, 5 ); sbSizer4->Add( m_listUserPaths, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bUserPathsButtonsSizer; bUserPathsButtonsSizer = new wxBoxSizer( wxVERTICAL ); Loading @@ -76,7 +76,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind sbSizer4->Add( bUserPathsButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); bMainSizer->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbSizer4, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbLibPathSizer; sbLibPathSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current search path list") ), wxVERTICAL ); Loading @@ -87,10 +87,10 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind sbLibPathSizer->Add( m_DefaultLibraryPathslistBox, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbLibPathSizer, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbLibPathSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 ); bMainSizer->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); Loading eeschema/dialog_eeschema_config_fbp.fbp +5 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ <event name="OnUpdateUI"></event> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">1</property> <object class="wxListBox" expanded="1"> <property name="bg"></property> Loading Loading @@ -414,7 +414,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="1"> <property name="id">wxID_ANY</property> Loading @@ -426,7 +426,7 @@ <event name="OnUpdateUI"></event> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">1</property> <object class="wxListBox" expanded="1"> <property name="bg"></property> Loading Loading @@ -647,7 +647,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="1"> <property name="id">wxID_ANY</property> Loading Loading @@ -713,7 +713,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxEXPAND | wxALL</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticLine" expanded="1"> <property name="bg"></property> Loading pcbnew/dialog_pcbnew_config_libs_and_paths.cpp +80 −10 Original line number Diff line number Diff line Loading @@ -141,6 +141,71 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnCloseWindow( wxCloseEvent& event ) } /********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonUpClick( wxCommandEvent& event ) /********************************************************************/ { wxArrayInt selections; m_ListLibr->GetSelections(selections); if ( selections.GetCount() <= 0 ) // No selection. return; if( selections[0] == 0 ) // The first lib is selected. cannot move up it return; wxArrayString libnames = m_ListLibr->GetStrings(); for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; EXCHG( libnames[jj], libnames[jj-1]); } m_ListLibr->Set(libnames); // Reselect previously selected names for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; m_ListLibr->SetSelection(jj-1); } m_LibListChanged = TRUE; } /*********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonDownClick( wxCommandEvent& event ) /*********************************************************************/ { wxArrayInt selections; m_ListLibr->GetSelections(selections); if ( selections.GetCount() <= 0 ) // No selection. return; // The last lib is selected. cannot move down it if( selections.Last() == (int)(m_ListLibr->GetCount()-1) ) return; wxArrayString libnames = m_ListLibr->GetStrings(); for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) { int jj = selections[ii]; EXCHG( libnames[jj], libnames[jj+1]); } m_ListLibr->Set(libnames); // Reselect previously selected names for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; m_ListLibr->SetSelection(jj+1); } m_LibListChanged = TRUE; } /*********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event ) Loading @@ -149,15 +214,15 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event ) * The real list (g_LibName_List) is not changed, so the change can be canceled */ { int ii; ii = m_ListLibr->GetSelection(); if( ii < 0 ) return; wxArrayInt selections; m_ListLibr->Delete(ii); m_ListLibr->GetSelections(selections); for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) { m_ListLibr->Delete(selections[ii] ); m_LibListChanged = TRUE; } } /**************************************************************************/ Loading @@ -170,12 +235,17 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event ) * The real list (g_LibName_List) is not changed, so the change can be canceled */ { int ii; int ii = 0; wxString libfilename; wxFileName fn; ii = m_ListLibr->GetSelection(); if( ii == wxNOT_FOUND ) wxArrayInt selections; m_ListLibr->GetSelections(selections); ii = selections.GetCount(); if( ii > 0 ) ii = selections[0]; else ii = 0; wxString libpath; Loading pcbnew/dialog_pcbnew_config_libs_and_paths.h +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ private: void OnCancelClick( wxCommandEvent& event ); void OnRemoveUserPath( wxCommandEvent& event ); void OnBrowseModDocFile( wxCommandEvent& event ); void OnButtonUpClick( wxCommandEvent& event ); void OnButtonDownClick( wxCommandEvent& event ); public: Loading Loading
eeschema/dialog_eeschema_config.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -294,10 +294,10 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event ) m_ListLibr->GetSelections(selections); ii = selections.GetCount(); if( ii <= 0 && event.GetId() != ID_ADD_LIB ) ii = 0; else if( ii > 0 ) ii = selections[0]; else ii = 0; wxString libpath; libpath = m_DefaultLibraryPathslistBox->GetStringSelection(); Loading
eeschema/dialog_eeschema_config_fbp.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind m_ListLibr->SetToolTip( _("List of active library files.\nOnly library files in this list are loaded by Eeschema.\nThe order of this list is important:\nEeschema searchs for a given component using this list order priority.") ); m_ListLibr->SetMinSize( wxSize( 400,250 ) ); sbLibsChoiceSizer->Add( m_ListLibr, 1, wxALL|wxEXPAND, 5 ); sbLibsChoiceSizer->Add( m_ListLibr, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bRightSizer; bRightSizer = new wxBoxSizer( wxVERTICAL ); Loading Loading @@ -60,7 +60,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") ); m_listUserPaths->SetMinSize( wxSize( 400,90 ) ); sbSizer4->Add( m_listUserPaths, 1, wxALL|wxEXPAND, 5 ); sbSizer4->Add( m_listUserPaths, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bUserPathsButtonsSizer; bUserPathsButtonsSizer = new wxBoxSizer( wxVERTICAL ); Loading @@ -76,7 +76,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind sbSizer4->Add( bUserPathsButtonsSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); bMainSizer->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbSizer4, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbLibPathSizer; sbLibPathSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current search path list") ), wxVERTICAL ); Loading @@ -87,10 +87,10 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind sbLibPathSizer->Add( m_DefaultLibraryPathslistBox, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbLibPathSizer, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbLibPathSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 ); bMainSizer->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); Loading
eeschema/dialog_eeschema_config_fbp.fbp +5 −5 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ <event name="OnUpdateUI"></event> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">1</property> <object class="wxListBox" expanded="1"> <property name="bg"></property> Loading Loading @@ -414,7 +414,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="1"> <property name="id">wxID_ANY</property> Loading @@ -426,7 +426,7 @@ <event name="OnUpdateUI"></event> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">1</property> <object class="wxListBox" expanded="1"> <property name="bg"></property> Loading Loading @@ -647,7 +647,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticBoxSizer" expanded="1"> <property name="id">wxID_ANY</property> Loading Loading @@ -713,7 +713,7 @@ </object> <object class="sizeritem" expanded="1"> <property name="border">5</property> <property name="flag">wxEXPAND | wxALL</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="proportion">0</property> <object class="wxStaticLine" expanded="1"> <property name="bg"></property> Loading
pcbnew/dialog_pcbnew_config_libs_and_paths.cpp +80 −10 Original line number Diff line number Diff line Loading @@ -141,6 +141,71 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnCloseWindow( wxCloseEvent& event ) } /********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonUpClick( wxCommandEvent& event ) /********************************************************************/ { wxArrayInt selections; m_ListLibr->GetSelections(selections); if ( selections.GetCount() <= 0 ) // No selection. return; if( selections[0] == 0 ) // The first lib is selected. cannot move up it return; wxArrayString libnames = m_ListLibr->GetStrings(); for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; EXCHG( libnames[jj], libnames[jj-1]); } m_ListLibr->Set(libnames); // Reselect previously selected names for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; m_ListLibr->SetSelection(jj-1); } m_LibListChanged = TRUE; } /*********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnButtonDownClick( wxCommandEvent& event ) /*********************************************************************/ { wxArrayInt selections; m_ListLibr->GetSelections(selections); if ( selections.GetCount() <= 0 ) // No selection. return; // The last lib is selected. cannot move down it if( selections.Last() == (int)(m_ListLibr->GetCount()-1) ) return; wxArrayString libnames = m_ListLibr->GetStrings(); for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) { int jj = selections[ii]; EXCHG( libnames[jj], libnames[jj+1]); } m_ListLibr->Set(libnames); // Reselect previously selected names for( size_t ii = 0; ii < selections.GetCount(); ii++ ) { int jj = selections[ii]; m_ListLibr->SetSelection(jj+1); } m_LibListChanged = TRUE; } /*********************************************************************/ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event ) Loading @@ -149,15 +214,15 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnRemoveLibClick( wxCommandEvent& event ) * The real list (g_LibName_List) is not changed, so the change can be canceled */ { int ii; ii = m_ListLibr->GetSelection(); if( ii < 0 ) return; wxArrayInt selections; m_ListLibr->Delete(ii); m_ListLibr->GetSelections(selections); for( int ii = selections.GetCount()-1; ii >= 0; ii-- ) { m_ListLibr->Delete(selections[ii] ); m_LibListChanged = TRUE; } } /**************************************************************************/ Loading @@ -170,12 +235,17 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event ) * The real list (g_LibName_List) is not changed, so the change can be canceled */ { int ii; int ii = 0; wxString libfilename; wxFileName fn; ii = m_ListLibr->GetSelection(); if( ii == wxNOT_FOUND ) wxArrayInt selections; m_ListLibr->GetSelections(selections); ii = selections.GetCount(); if( ii > 0 ) ii = selections[0]; else ii = 0; wxString libpath; Loading
pcbnew/dialog_pcbnew_config_libs_and_paths.h +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ private: void OnCancelClick( wxCommandEvent& event ); void OnRemoveUserPath( wxCommandEvent& event ); void OnBrowseModDocFile( wxCommandEvent& event ); void OnButtonUpClick( wxCommandEvent& event ); void OnButtonDownClick( wxCommandEvent& event ); public: Loading