slideshow/source/engine/slideshowimpl.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 57edae9d6931f60cedae6b2d6fd24f42fa28faa5 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Mon Aug 14 14:13:05 2023 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Aug 15 11:25:25 2023 +0200 tdf#154265 Disable automatic slide advancement when moving backwards When a slide has a 0 second automatic slide advance setting, and you move back to that slide, it would immediately move forward again. Only enable automatic slide advancement when moving forwards. Change-Id: I3c901bed5323569f5cf52aeca5b3227c87b6e539 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155663 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <[email protected]> (cherry picked from commit 850b66f969834e61f3cb1a1ccd4bfc15f23d558f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155695 Reviewed-by: Michael Stahl <[email protected]> diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 264a4dee8217..198c2ef83cb5 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -471,6 +471,7 @@ private: bool mbShowPaused; bool mbSlideShowIdle; bool mbDisableAnimationZOrder; + bool mbMovingForward; EffectRewinder maEffectRewinder; FrameSynchronization maFrameSynchronization; @@ -582,6 +583,7 @@ SlideShowImpl::SlideShowImpl( mbShowPaused( false ), mbSlideShowIdle( true ), mbDisableAnimationZOrder( false ), + mbMovingForward( true ), maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue), maFrameSynchronization(1.0 / FrameRate::PreferredFramesPerSecond) @@ -1207,6 +1209,7 @@ void SlideShowImpl::redisplayCurrentSlide() sal_Bool SlideShowImpl::nextEffect() { + mbMovingForward = true; osl::MutexGuard const guard( m_aMutex ); if (isDisposed()) @@ -1223,6 +1226,7 @@ sal_Bool SlideShowImpl::nextEffect() sal_Bool SlideShowImpl::previousEffect() { + mbMovingForward = false; osl::MutexGuard const guard( m_aMutex ); if (isDisposed()) @@ -2200,7 +2204,8 @@ void SlideShowImpl::notifySlideAnimationsEnded() // step slides manually. if( !mbForceManualAdvance && !mpRehearseTimingsActivity && - bHasAutomaticNextSlide ) + bHasAutomaticNextSlide && + mbMovingForward ) { aNotificationEvents = makeInterruptableDelay( [this]() { return this->notifySlideEnded( false ); },
