mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
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:
parent
d1305c265b
commit
bdd4fa1c0d
|
@ -295,8 +295,16 @@ void PresentationWidget::notifyPageChanged( int pageNumber, int changedFlags )
|
||||||
|
|
||||||
bool PresentationWidget::canUnloadPixmap( int pageNumber ) const
|
bool PresentationWidget::canUnloadPixmap( int pageNumber ) const
|
||||||
{
|
{
|
||||||
// can unload all pixmaps except for the currently visible one
|
if ( Okular::Settings::memoryLevel() != Okular::Settings::EnumMemoryLevel::Aggressive )
|
||||||
return pageNumber != m_frameIndex;
|
{
|
||||||
|
// 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 )
|
void PresentationWidget::setupActions( KActionCollection * collection )
|
||||||
|
|
Loading…
Reference in a new issue