Load currently selected alias when browsing.

Fixes: lp:1813882
* https://bugs.launchpad.net/kicad/+bug/1813882
This commit is contained in:
Jeff Young 2019-01-30 19:43:12 +00:00
parent 2dea3a49c8
commit 626dc7d9cf
1 changed files with 8 additions and 1 deletions

View File

@ -58,8 +58,15 @@ void LIB_VIEW_FRAME::OnSelectSymbol( wxCommandEvent& aEvent )
const auto libNicknames = libs->GetLogicalLibs();
adapter->AddLibraries( libNicknames, this );
LIB_ALIAS *current = getSelectedAlias();
LIB_ID id;
int unit;
int unit = 0;
if( current )
{
id = current->GetLibId();
adapter->SetPreselectNode( id, unit );
}
wxString dialogTitle;
dialogTitle.Printf( _( "Choose Symbol (%d items loaded)" ), adapter->GetItemCount() );