diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-05-10 03:34:55 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-05-10 03:35:01 -0400 |
| commit | fcaaa9f649ebeb9afeb33db8a67644c977b2c1af (patch) | |
| tree | 4bbd10ff2c616110aa718449b4dbd0b2b4e0e569 /Source | |
| parent | 78e59d08fe630d44d967b1a6f006e27d3bec4407 (diff) | |
HotkeyDlg: Fix keypress event binding
Previously no keypresses would be recognized during the button press phase.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinWX/HotkeyDlg.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp index 88dcb599dd..d0d5326302 100644 --- a/Source/Core/DolphinWX/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/HotkeyDlg.cpp @@ -48,7 +48,6 @@ void HotkeyConfigDialog::SaveButtonMapping(int Id, int Key, int Modkey) void HotkeyConfigDialog::EndGetButtons() { - Unbind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); m_ButtonMappingTimer.Stop(); GetButtonWaitingTimer = 0; GetButtonWaitingID = 0; @@ -162,8 +161,6 @@ void HotkeyConfigDialog::OnButtonClick(wxCommandEvent& event) if (m_ButtonMappingTimer.IsRunning()) return; - Bind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); - // Get the button ClickedButton = (wxButton *)event.GetEventObject(); SetEscapeId(wxID_CANCEL); @@ -328,6 +325,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls() m_Button_Hotkeys[i] = new wxButton(Page, i, wxEmptyString, wxDefaultPosition, size); m_Button_Hotkeys[i]->SetFont(m_SmallFont); m_Button_Hotkeys[i]->SetToolTip(_("Left click to detect hotkeys.\nEnter space to clear.")); + m_Button_Hotkeys[i]->Bind(wxEVT_KEY_DOWN, &HotkeyConfigDialog::OnKeyDown, this); SetButtonText(i, WxUtils::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]), WxUtils::WXKeymodToString( |
