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

Fix project duration label displaying one frame too much

BUG: 425639
parent 634ab3be
Pipeline #55574 passed with stage
in 10 minutes and 43 seconds
...@@ -2206,11 +2206,11 @@ void MainWindow::slotUpdateMousePosition(int pos) ...@@ -2206,11 +2206,11 @@ void MainWindow::slotUpdateMousePosition(int pos)
switch (m_timeFormatButton->currentItem()) { switch (m_timeFormatButton->currentItem()) {
case 0: case 0:
m_timeFormatButton->setText(pCore->currentDoc()->timecode().getTimecodeFromFrames(pos) + QStringLiteral(" / ") + m_timeFormatButton->setText(pCore->currentDoc()->timecode().getTimecodeFromFrames(pos) + QStringLiteral(" / ") +
pCore->currentDoc()->timecode().getTimecodeFromFrames(getMainTimeline()->controller()->duration())); pCore->currentDoc()->timecode().getTimecodeFromFrames(getMainTimeline()->controller()->duration() - 1));
break; break;
default: default:
m_timeFormatButton->setText( m_timeFormatButton->setText(
QStringLiteral("%1 / %2").arg(pos, 6, 10, QLatin1Char('0')).arg(getMainTimeline()->controller()->duration(), 6, 10, QLatin1Char('0'))); QStringLiteral("%1 / %2").arg(pos, 6, 10, QLatin1Char('0')).arg(getMainTimeline()->controller()->duration() - 1, 6, 10, QLatin1Char('0')));
} }
} }
} }
......
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