diff --git a/common/widgets/paged_dialog.cpp b/common/widgets/paged_dialog.cpp index e69cdcc983..9105a0f183 100644 --- a/common/widgets/paged_dialog.cpp +++ b/common/widgets/paged_dialog.cpp @@ -355,7 +355,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; @@ -373,7 +374,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 ) { @@ -381,7 +382,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 {