Don't use Cmd+C accelerator in dilogs on Mac by default.

This commit is contained in:
JulianSmart
2016-07-17 18:17:13 +01:00
parent 42b440487d
commit 22bcdf020e
2 changed files with 12 additions and 2 deletions

View File

@@ -275,7 +275,12 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
if (flags & wxCANCEL)
{
wxButton *cancel = new wxButton(this, wxID_CANCEL);
// Avoid Cmd+C closing dialog on Mac.
wxString cancelLabel(_("&Cancel"));
#ifdef __WXMAC__
cancelLabel.Replace("&",wxEmptyString);
#endif
wxButton *cancel = new wxButton(this, wxID_CANCEL, cancelLabel);
sizer->AddButton(cancel);
}