Don't allow seeking outside clip bounds, use consistent Shift+Wheel to seek 1 second

parent 01cd2631
......@@ -967,12 +967,13 @@ void Monitor::keyPressEvent(QKeyEvent *event)
void Monitor::slotMouseSeek(int eventDelta, uint modifiers)
{
if ((modifiers & Qt::ControlModifier) != 0u) {
if ((modifiers & Qt::ShiftModifier) != 0u) {
int delta = qRound(pCore->getCurrentFps());
if (eventDelta > 0) {
delta = 0 - delta;
}
m_glMonitor->getControllerProxy()->setPosition(m_glMonitor->getCurrentPos() - delta);
delta = qMax(0, m_glMonitor->getCurrentPos() - delta);
m_glMonitor->getControllerProxy()->setPosition(qMin(delta, m_glMonitor->duration() - 1));
} else if ((modifiers & Qt::AltModifier) != 0u) {
if (eventDelta >= 0) {
emit seekToPreviousSnap();
......
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