Enter won't close dialog if [Ok] button is disabled

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-07-18 21:48:31 +00:00
parent 1d37e64400
commit 73927f8bac

View File

@ -1540,7 +1540,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
btn = panel->GetDefaultItem(); btn = panel->GetDefaultItem();
} }
if ( btn ) if ( btn && btn->IsEnabled() )
{ {
// if we do have a default button, do press it // if we do have a default button, do press it
btn->MSWCommand(BN_CLICKED, 0 /* unused */); btn->MSWCommand(BN_CLICKED, 0 /* unused */);