Backport r1052137 | aacid | 2009-11-20 21:52:51 +0100 (Fri, 20 Nov 2009) | 3 lines

Get the viewport before resizing the canvas otherwise the canvas resizal makes the viewport change and later we end up with an incorrect viewport
BUGS: 215463

svn path=/branches/KDE/4.3/kdegraphics/okular/; revision=1052139
remotes/origin/KDE/4.3
Albert Astals Cid 17 years ago
parent 594916e0e1
commit f4b4eb2e44
  1. 2
      ui/pageview.cpp

@ -2971,6 +2971,7 @@ void PageView::slotRelayoutPages()
bool wasUpdatesEnabled = viewport()->updatesEnabled();
if ( fullWidth != widget()->width() || fullHeight != widget()->height() )
{
const Okular::DocumentViewport vp = d->document->viewport();
// disable updates and resize the viewportContents
if ( wasUpdatesEnabled )
viewport()->setUpdatesEnabled( false );
@ -2981,7 +2982,6 @@ void PageView::slotRelayoutPages()
// restore previous viewport if defined and updates enabled
if ( wasUpdatesEnabled )
{
const Okular::DocumentViewport & vp = d->document->viewport();
if ( vp.pageNumber >= 0 )
{
int prevX = horizontalScrollBar()->value(),

Loading…
Cancel
Save