]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Enter won't close dialog if [Ok] button is disabled
[wxWidgets.git] / src / msw / window.cpp
index 0442867815c35340b417ae9d282a155d492bd3aa..5f6bf803cf205592eb1ef19ad8921c1c579a57aa 100644 (file)
@@ -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 */);