| Summary: | advance time not constant in presentation mode | ||
|---|---|---|---|
| Product: | [Unmaintained] kpdf | Reporter: | Stefan Lienesch <stefan.lienesch> |
| Component: | general | Assignee: | Albert Astals Cid <aacid> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.5.5 | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Stefan Lienesch
2006-11-27 15:05:55 UTC
SVN commit 608521 by aacid:
Using a singleshot timer to start the auto page change is bad because if the user changes the page manually you get more than one timer active at once and then next pages change in what seems a random time.
BUGS: 137971
M +7 -5 presentationwidget.cpp
M +1 -0 presentationwidget.h
--- branches/KDE/3.5/kdegraphics/kpdf/ui/presentationwidget.cpp #608520:608521
@@ -67,6 +67,8 @@
connect( m_transitionTimer, SIGNAL( timeout() ), this, SLOT( slotTransitionStep() ) );
m_overlayHideTimer = new QTimer( this );
connect( m_overlayHideTimer, SIGNAL( timeout() ), this, SLOT( slotHideOverlay() ) );
+ m_nextPageTimer = new QTimer( this );
+ connect( m_nextPageTimer, SIGNAL( timeout() ), this, SLOT( slotNextPage() ) );
// handle cursor appearance as specified in configuration
if ( KpdfSettings::slidesCursor() == KpdfSettings::EnumSlidesCursor::HiddenDelay )
@@ -149,7 +151,7 @@
// auto advance to the next page if set
if ( KpdfSettings::slidesAdvance() )
- QTimer::singleShot( KpdfSettings::slidesAdvanceTime() * 1000, this, SLOT( slotNextPage() ) );
+ m_nextPageTimer->start( KpdfSettings::slidesAdvanceTime() * 1000 );
}
void PresentationWidget::notifyPageChanged( int pageNumber, int changedFlags )
@@ -707,7 +709,7 @@
// auto advance to the next page if set
if ( KpdfSettings::slidesAdvance() )
- QTimer::singleShot( KpdfSettings::slidesAdvanceTime() * 1000, this, SLOT( slotNextPage() ) );
+ m_nextPageTimer->start( KpdfSettings::slidesAdvanceTime() * 1000 );
}
else
{
@@ -719,7 +721,7 @@
{
m_transitionTimer->stop();
update();
- }
+ }
}
// we need the setFocus() call here to let KCursor::autoHide() work correctly
@@ -732,10 +734,10 @@
{
// go to previous page
changePage( m_frameIndex - 1 );
-
+
// auto advance to the next page if set
if ( KpdfSettings::slidesAdvance() )
- QTimer::singleShot( KpdfSettings::slidesAdvanceTime() * 1000, this, SLOT( slotNextPage() ) );
+ m_nextPageTimer->start( KpdfSettings::slidesAdvanceTime() * 1000 );
}
else
{
--- branches/KDE/3.5/kdegraphics/kpdf/ui/presentationwidget.h #608520:608521
@@ -79,6 +79,7 @@
// transition related
QTimer * m_transitionTimer;
QTimer * m_overlayHideTimer;
+ QTimer * m_nextPageTimer;
int m_transitionDelay;
int m_transitionMul;
QValueList< QRect > m_transitionRects;
|