Skip to content

Commit

Permalink
Merge pull request #2388 from lioncash/hotkeys
Browse files Browse the repository at this point in the history
HotkeyDlg: Fix keypress event binding
  • Loading branch information
skidau committed May 10, 2015
2 parents 78e59d0 + fcaaa9f commit 7d16bde
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/Core/DolphinWX/HotkeyDlg.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 7d16bde

Please sign in to comment.