diff --git a/common/widgets/paged_dialog.cpp b/common/widgets/paged_dialog.cpp index cfa262b5cf..f20b176d58 100644 --- a/common/widgets/paged_dialog.cpp +++ b/common/widgets/paged_dialog.cpp @@ -360,7 +360,8 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent ) { if( dynamic_cast( aEvent.GetEventObject() ) || dynamic_cast( aEvent.GetEventObject() ) - || dynamic_cast( aEvent.GetEventObject() ) ) + || dynamic_cast( aEvent.GetEventObject() ) + || dynamic_cast( FindFocus() ) ) { aEvent.Skip(); return; @@ -378,7 +379,7 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent ) 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 ) { @@ -386,7 +387,7 @@ void PAGED_DIALOG::onCharHook( wxKeyEvent& aEvent ) m_treebook->SetSelection( std::min( 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 {