Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit bf435556 authored by Albert Astals Cid's avatar Albert Astals Cid

Only take Okular::SettingsCore::slidesAdvanceTime into consideration if the...

Only take Okular::SettingsCore::slidesAdvanceTime into consideration if the user actually has autoAdvance checked

Fixes the case in which the page has duration, and Okular::SettingsCore::slidesAdvanceTime is smaller than the page duration but autoAdvance is disabled

BUGS: 340035
parent 717c4b0f
......@@ -1218,9 +1218,14 @@ void PresentationWidget::startAutoChangeTimer()
double pageDuration = m_frameIndex >= 0 && m_frameIndex < (int)m_frames.count() ? m_frames[ m_frameIndex ]->page->duration() : -1;
if ( m_advanceSlides || pageDuration >= 0.0 )
{
double secs = pageDuration < 0.0
? Okular::SettingsCore::slidesAdvanceTime()
: qMin<double>( pageDuration, Okular::SettingsCore::slidesAdvanceTime() );
double secs;
if ( pageDuration < 0.0 )
secs = Okular::SettingsCore::slidesAdvanceTime();
else if ( m_advanceSlides )
secs = qMin<double>( pageDuration, Okular::SettingsCore::slidesAdvanceTime() );
else
secs = pageDuration;
m_nextPageTimer->start( (int)( secs * 1000 ) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment