diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index 6fd41013c2..6598ea0add 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -534,7 +534,10 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() m_fpList->Append( footprint->GetFootprintName() ); } - int index = m_fpList->FindString( getCurFootprintName(), true ); + int index = wxNOT_FOUND; + + if( !getCurFootprintName().IsEmpty() ) + index = m_fpList->FindString( getCurFootprintName(), true ); if( index == wxNOT_FOUND ) { @@ -555,6 +558,9 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList() { m_fpList->SetSelection( index, true ); m_fpList->EnsureVisible( index ); + + wxCommandEvent dummy; + ClickOnFootprintList( dummy ); } }