Don't allow seeking below 0 (unexpected behavior)

parent dd48f08e
......@@ -1173,7 +1173,7 @@ void Monitor::slotForward(double speed)
void Monitor::slotRewindOneFrame(int diff)
{
slotActivateMonitor();
m_glMonitor->getControllerProxy()->setPosition(m_glMonitor->getCurrentPos() - diff);
m_glMonitor->getControllerProxy()->setPosition(qMax(0, m_glMonitor->getCurrentPos() - diff));
}
void Monitor::slotForwardOneFrame(int diff)
......
......@@ -892,7 +892,7 @@ Rectangle {
}
} else {
var delta = wheel.modifiers & Qt.ShiftModifier ? timeline.fps() : 1
proxy.position = Math.min(root.consumerPosition - (wheel.angleDelta.y > 0 ? delta : -delta), timeline.fullDuration - 1)
proxy.position = wheel.angleDelta.y > 0 ? Math.max(root.consumerPosition - delta, 0) : Math.min(root.consumerPosition + delta, timeline.fullDuration - 1)
}
}
onPressed: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment