Make the hotkey dialog close when the escape key is pressed. I commit this as an example of how all dialogs should be set up. The buttons used to close the dialog should use wxID_OK or wxID_CANCEL. Alternatively you can use SetEscapeId or SetAffirmativeId to set the escape id to the id you use.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7350 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-03-15 13:38:52 +00:00
parent 27142fafe0
commit 1e46f069c2
3 changed files with 18 additions and 36 deletions

View File

@ -1062,12 +1062,11 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
break;
case ID_HOTKEY_CONFIG:
{
HotkeyConfigDialog *m_HotkeyDialog = new HotkeyConfigDialog(this);
m_HotkeyDialog->ShowModal();
m_HotkeyDialog->Destroy();
// Update the GUI in case menu accelerators were changed
main_frame->UpdateGUI();
HotkeyConfigDialog m_HotkeyDialog(this);
m_HotkeyDialog.ShowModal();
}
// Update the GUI in case menu accelerators were changed
main_frame->UpdateGUI();
break;
}
}