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

svn path=/trunk/KDE/kdegraphics/okular/; revision=803592
This commit is contained in:
Albert Astals Cid 2008-05-03 12:34:49 +00:00
parent d1305c265b
commit bdd4fa1c0d

View file

@ -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 )