diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 174a44304b..df3ca2b0b9 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -621,6 +621,12 @@ void LIB_VIEW_FRAME::ClickOnLibList( wxCommandEvent& event ) m_selection_changed = true; SetSelectedLibrary( m_libList->GetString( ii ) ); + + // 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 + GetGalCanvas()->SetStealsFocus( false ); + m_libList->SetFocus(); } @@ -651,6 +657,12 @@ 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 + GetGalCanvas()->SetStealsFocus( false ); + m_cmpList->SetFocus(); } diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index e000794689..eeac27876b 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -403,6 +403,12 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) 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 + GetGalCanvas()->SetStealsFocus( false ); + m_libList->SetFocus(); } @@ -453,6 +459,12 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) m_canvas->Refresh(); Update3D_Frame(); } + + // The m_footprintList 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 + GetGalCanvas()->SetStealsFocus( false ); + m_footprintList->SetFocus(); }