From: Carl Hetherington Date: Mon, 29 May 2023 20:47:48 +0000 (+0200) Subject: Focus the "make DCP/OK" button in the hints dialog (#2539). X-Git-Tag: v2.16.57~1 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=4493f23618adee7901c297ed6402611205a1cce4 Focus the "make DCP/OK" button in the hints dialog (#2539). --- diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index 7a44e2267..72a57740e 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -69,15 +69,20 @@ HintsDialog::HintsDialog (wxWindow* parent, std::weak_ptr film, bool ok) auto buttons = CreateStdDialogButtonSizer (0); sizer->Add (CreateSeparatedSizer(buttons), wxSizerFlags().Expand().DoubleBorder()); + wxButton* default_button = nullptr; if (ok) { - buttons->SetAffirmativeButton (new wxButton (this, wxID_OK)); + default_button = new wxButton(this, wxID_OK); + buttons->SetAffirmativeButton(default_button); } else { - buttons->SetAffirmativeButton (new wxButton (this, wxID_OK, _("Make DCP"))); + default_button = new wxButton(this, wxID_OK, _("Make DCP")); + buttons->SetAffirmativeButton(default_button); buttons->SetNegativeButton (new wxButton (this, wxID_CANCEL, _("Go back"))); } buttons->Realize (); + default_button->SetFocus(); + SetSizer (sizer); sizer->Layout (); sizer->SetSizeHints (this);