Make "Close" button affirmative ID in standard dialog button sizer.

This allows to use the Escape key to close a dialog with the "Close" button
only.

Closes #16185.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-04-28 11:28:35 +00:00
parent d75eb338c2
commit 07ff314c13

View File

@ -370,6 +370,8 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
SetAffirmativeId(wxID_OK);
else if (flags & wxYES)
SetAffirmativeId(wxID_YES);
else if (flags & wxCLOSE)
SetAffirmativeId(wxID_CLOSE);
sizer->Realize();