Killed a bug that sometimes prevented ShowModal from returning if the
ESC key was used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -213,6 +213,9 @@ void wxDialog::OnCharHook(wxKeyEvent& event)
|
|||||||
cancelEvent.SetEventObject( this );
|
cancelEvent.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent(cancelEvent);
|
GetEventHandler()->ProcessEvent(cancelEvent);
|
||||||
|
|
||||||
|
// ensure that there is another message for this window so the
|
||||||
|
// ShowModal loop will exit and won't get stuck in GetMessage().
|
||||||
|
::PostMessage(GetHwnd(), WM_NULL, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user