Commit a42613bd authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix incorrect speed cycling with j/l keys

parent 5174b1e3
Pipeline #60249 passed with stage
in 8 minutes and 39 seconds
......@@ -1299,9 +1299,10 @@ void Monitor::slotRewind(double speed)
if (currentspeed > -1) {
m_glMonitor->purgeCache();
speed = -1;
m_speedIndex = 0;
} else {
m_speedIndex++;
if (m_speedIndex > 4) {
if (m_speedIndex > 5) {
m_speedIndex = 0;
}
speed = -MonitorManager::speedArray[m_speedIndex];
......@@ -1319,18 +1320,17 @@ void Monitor::slotForward(double speed, bool allowNormalPlay)
if (qFuzzyIsNull(speed)) {
double currentspeed = m_glMonitor->playSpeed();
if (currentspeed < 1) {
m_speedIndex = 0;
if (allowNormalPlay) {
m_glMonitor->purgeCache();
updatePlayAction(true);
m_glMonitor->switchPlay(true, m_offset);
return;
} else {
m_speedIndex = 0;
}
} else {
m_speedIndex++;
}
if (m_speedIndex > 4) {
if (m_speedIndex > 5) {
m_speedIndex = 0;
}
speed = MonitorManager::speedArray[m_speedIndex];
......
......@@ -32,7 +32,7 @@
#include "kdenlive_debug.h"
#include <QObject>
const double MonitorManager::speedArray[5] = {1.5, 2., 3., 5.5, 10.};
const double MonitorManager::speedArray[6] = {1. ,1.5, 2., 3., 5.5, 10.};
MonitorManager::MonitorManager(QObject *parent)
: QObject(parent)
......
......@@ -73,7 +73,7 @@ public:
/** @brief Returns true if the clip monitor is visible (and not tabbed under another dock. */
bool clipMonitorVisible() const;
QTimer refreshTimer;
static const double speedArray[5];
static const double speedArray[6];
public slots:
......
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