From 72b11add9cfee056efc78b211567dfe99c5b980d Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 23 Jul 2021 06:44:45 -0700 Subject: [PATCH] viewer: don't use in/out on loop unless play in/out was selected Fixes #1302 --- app/widget/viewer/viewer.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/widget/viewer/viewer.cpp b/app/widget/viewer/viewer.cpp index 736450acf..bcfa27815 100644 --- a/app/widget/viewer/viewer.cpp +++ b/app/widget/viewer/viewer.cpp @@ -1156,21 +1156,18 @@ void ViewerWidget::PlaybackTimerUpdate() int64_t min_time, max_time; - { - if ((play_in_to_out_only_ || Config::Current()["Loop"].toBool()) - && GetConnectedNode()->GetTimelinePoints()->workarea()->enabled()) { + if (play_in_to_out_only_ && GetConnectedNode()->GetTimelinePoints()->workarea()->enabled()) { - // If "play in to out" is enabled or we're looping AND we have a workarea, only play the workarea - min_time = Timecode::time_to_timestamp(GetConnectedNode()->GetTimelinePoints()->workarea()->in(), timebase()); - max_time = Timecode::time_to_timestamp(GetConnectedNode()->GetTimelinePoints()->workarea()->out(), timebase()); + // If "play in to out" is enabled or we're looping AND we have a workarea, only play the workarea + min_time = Timecode::time_to_timestamp(GetConnectedNode()->GetTimelinePoints()->workarea()->in(), timebase()); + max_time = Timecode::time_to_timestamp(GetConnectedNode()->GetTimelinePoints()->workarea()->out(), timebase()); - } else { + } else { - // Otherwise set the bounds to the range of the sequence - min_time = 0; - max_time = Timecode::time_to_timestamp(GetConnectedNode()->GetLength(), timebase()); + // Otherwise set the bounds to the range of the sequence + min_time = 0; + max_time = Timecode::time_to_timestamp(GetConnectedNode()->GetLength(), timebase()); - } } if ((playback_speed_ < 0 && current_time <= min_time)