Add wxGrids to list of things that get arrow keys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17144
(cherry picked from commit f754410c7e
)
This commit is contained in:
parent
1fc79b9a46
commit
60dbd0ce0d
|
@ -355,7 +355,8 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( dynamic_cast<wxTextEntry*>( aEvent.GetEventObject() )
|
if( dynamic_cast<wxTextEntry*>( aEvent.GetEventObject() )
|
||||||
|| dynamic_cast<wxStyledTextCtrl*>( aEvent.GetEventObject() )
|
|| dynamic_cast<wxStyledTextCtrl*>( aEvent.GetEventObject() )
|
||||||
|| dynamic_cast<wxListView*>( aEvent.GetEventObject() ) )
|
|| dynamic_cast<wxListView*>( aEvent.GetEventObject() )
|
||||||
|
|| dynamic_cast<wxGrid*>( FindFocus() ) )
|
||||||
{
|
{
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
return;
|
return;
|
||||||
|
@ -373,7 +374,7 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent )
|
||||||
m_treebook->SetSelection( page - 1 );
|
m_treebook->SetSelection( page - 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_treebook->GetTreeCtrl()->SetFocus(); // Don't allow preview canvas to steal focus
|
m_treebook->GetTreeCtrl()->SetFocus(); // Don't allow preview canvas to steal gridFocus
|
||||||
}
|
}
|
||||||
else if( aEvent.GetKeyCode() == WXK_DOWN )
|
else if( aEvent.GetKeyCode() == WXK_DOWN )
|
||||||
{
|
{
|
||||||
|
@ -381,7 +382,7 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent )
|
||||||
|
|
||||||
m_treebook->SetSelection( std::min<int>( page + 1, m_treebook->GetPageCount() - 1 ) );
|
m_treebook->SetSelection( std::min<int>( page + 1, m_treebook->GetPageCount() - 1 ) );
|
||||||
|
|
||||||
m_treebook->GetTreeCtrl()->SetFocus(); // Don't allow preview canvas to steal focus
|
m_treebook->GetTreeCtrl()->SetFocus(); // Don't allow preview canvas to steal gridFocus
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue