Browse Source

pcbnew: Fixed listing of 3D libraries in the github wizard

Fixes: lp:1830137
* https://bugs.launchpad.net/kicad/+bug/1830137
pull/15/head
Ian McInerney 7 years ago
committed by Seth Hillbrand
parent
commit
0daf14f9c3
  1. 21
      pcbnew/dialogs/wizard_3DShape_Libs_downloader.cpp

21
pcbnew/dialogs/wizard_3DShape_Libs_downloader.cpp

@ -512,10 +512,27 @@ void WIZARD_3DSHAPE_LIBS_DOWNLOADER::setupGithubList()
m_checkList3Dlibnames->GetCheckedItems( checkedIndices );
enableNext( checkedIndices.GetCount() > 0 );
// Update only if necessary
if( m_githubLibs.GetCount() == 0 )
// Update only if the text has changed or the list is empty
if( m_githubLibs.GetCount() == 0 || m_textCtrlGithubURL->IsModified() )
{
m_githubLibs.Clear();
getLibsListGithub( m_githubLibs );
// Populate the list
m_checkList3Dlibnames->Clear();
for( unsigned int i = 0; i < m_githubLibs.GetCount(); ++i )
{
const wxString& lib = m_githubLibs[i].AfterLast( '/' );
m_checkList3Dlibnames->Append( lib );
}
m_textCtrlGithubURL->SetModified( 0 );
}
if( !m_checkList3Dlibnames->IsEmpty() )
m_checkList3Dlibnames->EnsureVisible( 0 );
// Clear the search box
m_searchCtrl3Dlibs->Clear();
// Clear the review list so it will be reloaded

Loading…
Cancel
Save