diff --git a/eeschema/lib_view_frame.cpp b/eeschema/lib_view_frame.cpp index 8cd624568a..cd914e2a6b 100644 --- a/eeschema/lib_view_frame.cpp +++ b/eeschema/lib_view_frame.cpp @@ -558,6 +558,11 @@ void LIB_VIEW_FRAME::SetSelectedLibrary( const wxString& aLibraryName ) // (which is not necessary the case if SetSelectedLibrary is called // by another caller than ClickOnLibList. m_libList->SetStringSelection( m_libraryName, true ); + + // The m_libList has now the focus, in order to be able to use arrow keys + // to navigate inside the list. + // the gal canvas must not steal the focus to allow navigation + GetCanvas()->SetStealsFocus( false ); m_libList->SetFocus(); } @@ -572,6 +577,11 @@ void LIB_VIEW_FRAME::ClickOnCmpList( wxCommandEvent& event ) m_selection_changed = true; SetSelectedComponent( m_cmpList->GetString( ii ) ); + + // The m_cmpList has now the focus, in order to be able to use arrow keys + // to navigate inside the list. + // the gal canvas must not steal the focus to allow navigation + GetCanvas()->SetStealsFocus( false ); m_cmpList->SetFocus(); } diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index b01f9b72f4..0789433f55 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -580,6 +580,12 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& aEvent ) ReCreateFootprintList(); UpdateTitle(); + + // The m_libList has now the focus, in order to be able to use arrow keys + // to navigate inside the list. + // the gal canvas must not steal the focus to allow navigation + GetCanvas()->SetStealsFocus( false ); + m_libList->SetFocus(); } @@ -629,6 +635,12 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& aEvent ) GetCanvas()->Refresh(); Update3DView( true ); } + + // The m_fpList has now the focus, in order to be able to use arrow keys + // to navigate inside the list. + // the gal canvas must not steal the focus to allow navigation + GetCanvas()->SetStealsFocus( false ); + m_fpList->SetFocus(); }