summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-08-14 14:13:05 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-08-14 21:40:33 +0200
commit850b66f969834e61f3cb1a1ccd4bfc15f23d558f (patch)
treeb33ef546daf289ae22ddd455d84046e459c0544c /slideshow
parentd827d36625e8952ef3bfadbf8de76578074d474d (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>
Diffstat (limited to 'slideshow')
-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 f681dc2a9559..33a9825e544a 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -479,6 +479,7 @@ private:
bool mbShowPaused;
bool mbSlideShowIdle;
bool mbDisableAnimationZOrder;
+ bool mbMovingForward;
EffectRewinder maEffectRewinder;
FrameSynchronization maFrameSynchronization;
@@ -590,6 +591,7 @@ SlideShowImpl::SlideShowImpl(
mbShowPaused( false ),
mbSlideShowIdle( true ),
mbDisableAnimationZOrder( false ),
+ mbMovingForward( true ),
maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue),
maFrameSynchronization(1.0 / FrameRate::PreferredFramesPerSecond)
@@ -1215,6 +1217,7 @@ void SlideShowImpl::redisplayCurrentSlide()
sal_Bool SlideShowImpl::nextEffect()
{
+ mbMovingForward = true;
osl::MutexGuard const guard( m_aMutex );
if (isDisposed())
@@ -1231,6 +1234,7 @@ sal_Bool SlideShowImpl::nextEffect()
sal_Bool SlideShowImpl::previousEffect()
{
+ mbMovingForward = false;
osl::MutexGuard const guard( m_aMutex );
if (isDisposed())
@@ -2310,7 +2314,8 @@ void SlideShowImpl::notifySlideAnimationsEnded()
// step slides manually.
if( !mbForceManualAdvance &&
!mpRehearseTimingsActivity &&
- bHasAutomaticNextSlide )
+ bHasAutomaticNextSlide &&
+ mbMovingForward )
{
aNotificationEvents = makeInterruptableDelay(
[this]() { return this->notifySlideEnded( false ); },