library viewers: fix a focus issue that prevent using arrow keys in lib or fp lists.
Once the gal canvas hsad the focus, it was not possible to use arrow keys in library or symbols or fp lists even after clicking on an item. This focus issue is now fixed. Fixes #4292 https://gitlab.com/kicad/code/kicad/issues/4292
This commit is contained in:
parent
63291141df
commit
05afbcc22e
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue