make sure we keep next and previous pages if we are on aggresive mode

svn path=/trunk/KDE/kdegraphics/okular/; revision=803592
remotes/origin/KDE/4.1
Albert Astals Cid 18 years ago
parent d1305c265b
commit bdd4fa1c0d
  1. 12
      ui/presentationwidget.cpp

@ -295,8 +295,16 @@ void PresentationWidget::notifyPageChanged( int pageNumber, int changedFlags )
bool PresentationWidget::canUnloadPixmap( int pageNumber ) const
{
// can unload all pixmaps except for the currently visible one
return pageNumber != m_frameIndex;
if ( Okular::Settings::memoryLevel() != Okular::Settings::EnumMemoryLevel::Aggressive )
{
// can unload all pixmaps except for the currently visible one
return pageNumber != m_frameIndex;
}
else
{
// can unload all pixmaps except for the currently visible one, previous and next
return qAbs(pageNumber - m_frameIndex) <= 1;
}
}
void PresentationWidget::setupActions( KActionCollection * collection )

Loading…
Cancel
Save