DIALOG_SHIM: fix incorrect escape key handling.

Fixes #4304
https://gitlab.com/kicad/code/kicad/issues/4304
This commit is contained in:
jean-pierre charras 2020-05-03 12:51:58 +02:00
parent 56946f4db1
commit da05b43a9f
1 changed files with 3 additions and 1 deletions

View File

@ -511,7 +511,9 @@ void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
{
if( m_parentFrame )
// Do not send WXK_ESCAPE char hook event to the parent frame
// It must be handled by the dialog itself
if( m_parentFrame && aEvt.GetKeyCode() != WXK_ESCAPE )
{
m_parentFrame->DispatchBehindModalDialog( aEvt );