From 98ca2b474b23903faff8288cd5d6e52b3c69f6ca Mon Sep 17 00:00:00 2001 From: "james.k.crook" Date: Sun, 14 Feb 2010 15:27:22 +0000 Subject: [PATCH] When 'OK' is the default button it is now also given focus, so that ENTER will push it. --- src/ShuttleGui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index acb86c60c..ff27331a8 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -2008,6 +2008,8 @@ wxSizer *CreateStdButtonSizer(wxWindow *parent, long buttons, wxButton *extra) b = new wxButton( parent, wxID_OK ); b->SetDefault(); bs->AddButton( b ); + // Needs to be default and focus for ENTER to work. + b->SetFocus(); } if( buttons & eCancelButton ) @@ -2020,6 +2022,8 @@ wxSizer *CreateStdButtonSizer(wxWindow *parent, long buttons, wxButton *extra) b = new wxButton( parent, wxID_YES ); b->SetDefault(); bs->AddButton( b ); + // Needs to be default and focus for ENTER to work. + b->SetFocus(); } if( buttons & eNoButton )