Manually set the scrollbars range, so they are correct when the viewport is resized and the content widget has the same size.

BUG: 155652

svn path=/trunk/KDE/kdegraphics/okular/; revision=761348
This commit is contained in:
Pino Toscano 2008-01-14 16:29:12 +00:00
parent b0245bd01d
commit 4333d4b0b5

View file

@ -2697,6 +2697,9 @@ void PageView::slotRelayoutPages()
// 3) reset dirty state
d->dirtyLayout = false;
horizontalScrollBar()->setRange( 0, qMax( 0, fullWidth - viewport()->width() ) );
verticalScrollBar()->setRange( 0, qMax( 0, fullHeight - viewport()->height() ) );
// 4) update scrollview's contents size and recenter view
bool wasUpdatesEnabled = viewport()->updatesEnabled();
if ( fullWidth != widget()->width() || fullHeight != widget()->height() )