Fix seconds working after 1 minute in timecode. (#509)

This commit is contained in:
Jeremy Bullock 2020-11-16 12:56:45 -07:00 committed by GitHub
parent 5ca6de7e04
commit c0624bc06f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2072,7 +2072,7 @@ void FlipConsole::updateCurrentTime() {
int seconds = (int)((double)(m_currentFrame) / m_sceneFps); int seconds = (int)((double)(m_currentFrame) / m_sceneFps);
int frames = (m_currentFrame) % (int)m_sceneFps; int frames = (m_currentFrame) % (int)m_sceneFps;
int minutes = seconds / 60; int minutes = seconds / 60;
int realSeconds = minutes > 0 ? seconds % minutes : seconds; int realSeconds = seconds - (minutes * 60);
QString strMinutes = QString("%1").arg(minutes, 2, 10, QChar('0')); QString strMinutes = QString("%1").arg(minutes, 2, 10, QChar('0'));
QString strSeconds = QString("%1").arg(realSeconds, 2, 10, QChar('0')); QString strSeconds = QString("%1").arg(realSeconds, 2, 10, QChar('0'));
QString strFrames = QString("%1").arg(frames, 2, 10, QChar('0')); QString strFrames = QString("%1").arg(frames, 2, 10, QChar('0'));