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);
|
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);
|
else
|
||||||
else
|
cmd::call("video/frame/prev/keyframe", c);
|
||||||
cmd::call("video/frame/prev/keyframe", c);
|
else {
|
||||||
else {
|
SetValue(val + (event.GetWheelRotation() > 0 ? -1 : 1));
|
||||||
SetValue(val + (event.GetWheelRotation() > 0 ? -1 : 1));
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue