summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-08-14 14:13:05 +0200
committerAndras Timar <andras.timar@collabora.com>2023-08-24 08:24:41 +0200
commitc9ac3632c39f9e4a21fd7771906cd2f5cc4bc201 (patch)
treed7f7fce7faf2e9465ea00d52c0dd106a00c5a378
parentfd077079bc0937c3055cde52b50c7805ce0e3160 (diff)
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 <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 850b66f969834e61f3cb1a1ccd4bfc15f23d558f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155695 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx7
1 files changed, 6 insertions, 1 deletions
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 ); },