Use ForwardMouseWheelEvent rather than checking window bounds
This commit is contained in:
parent
c7aba2f54a
commit
dd6542c143
1 changed files with 9 additions and 15 deletions
|
@ -145,23 +145,17 @@ void VideoSlider::OnMouse(wxMouseEvent &event) {
|
|||
|
||||
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 (GetClientRect().Contains(event.GetX(), event.GetY())) {
|
||||
if (event.ShiftDown())
|
||||
if (event.GetWheelRotation() < 0)
|
||||
cmd::call("video/frame/next/keyframe", c);
|
||||
else
|
||||
cmd::call("video/frame/prev/keyframe", c);
|
||||
else {
|
||||
SetValue(val + (event.GetWheelRotation() > 0 ? -1 : 1));
|
||||
c->videoController->JumpToFrame(val);
|
||||
}
|
||||
if (event.ShiftDown())
|
||||
if (event.GetWheelRotation() < 0)
|
||||
cmd::call("video/frame/next/keyframe", c);
|
||||
else
|
||||
cmd::call("video/frame/prev/keyframe", c);
|
||||
else {
|
||||
SetValue(val + (event.GetWheelRotation() > 0 ? -1 : 1));
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue