Merge pull request #2885 from manongjohn/fix_playback_first_frame_skip

Fix playback skipping first frame
This commit is contained in:
Rodney 2019-11-19 21:32:42 -07:00 committed by GitHub
commit adef8baa09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,7 +191,7 @@ void PlaybackExecutor::run() {
emissionInstant = timer.getTotalTime();
// Draw the next frame
emit nextFrame(fps); // Show the next frame, telling
if (playedFramesCount) emit nextFrame(fps); // Show the next frame, telling
// currently measured fps
if (FlipConsole::m_areLinked) {
@ -320,17 +320,15 @@ void FlipSlider::paintEvent(QPaintEvent *ev) {
p.drawImage(QRect(0, 0, PBColorMarginLeft, height()), PBOverlay,
QRect(0, 0, PBColorMarginLeft, PBOverlay.height()));
p.drawImage(
QRect(PBColorMarginLeft, 0,
p.drawImage(QRect(PBColorMarginLeft, 0,
sliderRect.width() - PBColorMarginLeft - PBColorMarginRight,
height()),
PBOverlay,
QRect(PBColorMarginLeft, 0, overlayInnerWidth, PBOverlay.height()));
PBOverlay, QRect(PBColorMarginLeft, 0, overlayInnerWidth,
PBOverlay.height()));
p.drawImage(
QRect(width() - PBColorMarginRight, 0, PBColorMarginRight, height()),
PBOverlay,
QRect(PBOverlay.width() - PBColorMarginRight, 0, PBColorMarginRight,
PBOverlay.height()));
PBOverlay, QRect(PBOverlay.width() - PBColorMarginRight, 0,
PBColorMarginRight, PBOverlay.height()));
// Draw the position marker
currPos = sliderPositionFromValue(minimum(), maxValuePlusStep, value(),
@ -757,7 +755,8 @@ bool FlipConsole::drawBlanks(int from, int to) {
if (m_blanksToDraw > 1 ||
(m_blanksToDraw == 0 &&
((m_reverse && m_currentFrame - m_step < from) ||
(!m_reverse && m_currentFrame + m_step >
(!m_reverse &&
m_currentFrame + m_step >
to)))) // we are on the last frame of the loop
{
m_blanksToDraw = (m_blanksToDraw == 0 ? m_blanksCount : m_blanksToDraw - 1);