improve the support of searching when in presentation mode:

- don't complain about "new" pages to be setup, if the document is the same
- when there's a change in a page (or a page switching) due to the search, ignore any transition

svn path=/trunk/KDE/kdegraphics/okular/; revision=704005
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent 531b8abff5
commit 78d7cb27a3
  1. 9
      ui/presentationwidget.cpp

@ -157,8 +157,13 @@ PresentationWidget::~PresentationWidget()
}
void PresentationWidget::notifySetup( const QVector< Okular::Page * > & pageSet, bool /*documentChanged*/ )
void PresentationWidget::notifySetup( const QVector< Okular::Page * > & pageSet, bool documentChanged )
{
// same document, nothing to change - here we assume the document sets up
// us with the whole document set as first notifySetup()
if ( !documentChanged )
return;
// delete previous frames (if any (shouldn't be))
QVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end();
for ( ; fIt != fEnd; ++fIt )
@ -220,7 +225,7 @@ void PresentationWidget::notifyPageChanged( int pageNumber, int changedFlags )
{
// check if it's the last requested pixmap. if so update the widget.
if ( (changedFlags & ( DocumentObserver::Pixmap | DocumentObserver::Annotations | DocumentObserver::Highlights ) ) && pageNumber == m_frameIndex )
generatePage( changedFlags & DocumentObserver::Annotations );
generatePage( changedFlags & ( DocumentObserver::Annotations | DocumentObserver::Highlights ) );
}
bool PresentationWidget::canUnloadPixmap( int pageNumber ) const

Loading…
Cancel
Save