From: Vadim Zeitlin Date: Sun, 18 Jul 1999 21:48:31 +0000 (+0000) Subject: Enter won't close dialog if [Ok] button is disabled X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/73927f8bac6a9392855eb20def7cf2a0049c05e4 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 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0442867815..5f6bf803cf 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1540,7 +1540,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) btn = panel->GetDefaultItem(); } - if ( btn ) + if ( btn && btn->IsEnabled() ) { // if we do have a default button, do press it btn->MSWCommand(BN_CLICKED, 0 /* unused */);