diff --git a/eeschema/viewlibs.cpp b/eeschema/viewlibs.cpp index 18c9457855..1841e4d509 100644 --- a/eeschema/viewlibs.cpp +++ b/eeschema/viewlibs.cpp @@ -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() );