forked from mia/Aegisub
Add mouse wheel forwarding code to FrameMain for when focus is on something that doesn't handle scroll events
Originally committed to SVN as r5782.
This commit is contained in:
parent
1741ce93f6
commit
9ed1653aae
2 changed files with 6 additions and 0 deletions
|
@ -554,6 +554,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
|
||||||
EVT_CLOSE(FrameMain::OnCloseWindow)
|
EVT_CLOSE(FrameMain::OnCloseWindow)
|
||||||
|
|
||||||
EVT_KEY_DOWN(FrameMain::OnKeyDown)
|
EVT_KEY_DOWN(FrameMain::OnKeyDown)
|
||||||
|
EVT_MOUSEWHEEL(FrameMain::OnMouseWheel)
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// EVT_MENU(wxID_ABOUT, FrameMain::OnAbout)
|
// EVT_MENU(wxID_ABOUT, FrameMain::OnAbout)
|
||||||
|
@ -686,3 +687,7 @@ void FrameMain::OnKeyDown(wxKeyEvent &event) {
|
||||||
if (!hotkey::check("Main Frame", context.get(), event.GetKeyCode(), event.GetUnicodeKey(), event.GetModifiers()))
|
if (!hotkey::check("Main Frame", context.get(), event.GetKeyCode(), event.GetUnicodeKey(), event.GetModifiers()))
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrameMain::OnMouseWheel(wxMouseEvent &evt) {
|
||||||
|
ForwardMouseWheelEvent(this, evt);
|
||||||
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@ class FrameMain: public wxFrame {
|
||||||
void UpdateTitle();
|
void UpdateTitle();
|
||||||
|
|
||||||
void OnKeyDown(wxKeyEvent &event);
|
void OnKeyDown(wxKeyEvent &event);
|
||||||
|
void OnMouseWheel(wxMouseEvent &evt);
|
||||||
|
|
||||||
/// @brief Autosave the currently open file, if any
|
/// @brief Autosave the currently open file, if any
|
||||||
void OnAutoSave(wxTimerEvent &event);
|
void OnAutoSave(wxTimerEvent &event);
|
||||||
|
|
Loading…
Reference in a new issue