Use ForwardMouseWheelEvent rather than checking window bounds

This commit is contained in:
Thomas Goyne 2013-08-14 20:09:10 -07:00
parent c7aba2f54a
commit dd6542c143

View file

@ -145,9 +145,8 @@ void VideoSlider::OnMouse(wxMouseEvent &event) {
c->videoController->JumpToFrame(val); c->videoController->JumpToFrame(val);
} }
else if (event.GetWheelRotation() != 0) { else if (event.GetWheelRotation() != 0 && ForwardMouseWheelEvent(this, event)) {
// If mouse is over the slider, use wheel to step by frames or keyframes (when Shift is held) // If mouse is over the slider, use wheel to step by frames or keyframes (when Shift is held)
if (GetClientRect().Contains(event.GetX(), event.GetY())) {
if (event.ShiftDown()) if (event.ShiftDown())
if (event.GetWheelRotation() < 0) if (event.GetWheelRotation() < 0)
cmd::call("video/frame/next/keyframe", c); cmd::call("video/frame/next/keyframe", c);
@ -158,11 +157,6 @@ void VideoSlider::OnMouse(wxMouseEvent &event) {
c->videoController->JumpToFrame(val); c->videoController->JumpToFrame(val);
} }
} }
else
// Forward Wheel to subs grid to scroll by line/page
if (c->subsGrid->GetClientRect().Contains(event.GetX(), event.GetY()))
c->subsGrid->GetEventHandler()->ProcessEvent(event);
}
} }
void VideoSlider::OnCharHook(wxKeyEvent &event) { void VideoSlider::OnCharHook(wxKeyEvent &event) {