Fix mid mouse button click on the scrollbar

On 45dc1990 i made the wrong assumption that if you were in
slotRequestVisiblePixmaps with the mid mouse button pressed
it meant that you were mid mouse button zooming, but this is not
true if you mid mouse click on the scrollbar.

So the solution to ignore pixmap request on mid mouse button zooming
is actually use blockPixmapsRequest

BUGS: 341583
FIXED-IN: 14.12.1
This commit is contained in:
Albert Astals Cid 2014-12-12 00:48:41 +01:00
parent b069e3557f
commit 67807b73b8

View file

@ -1893,7 +1893,9 @@ void PageView::mouseMoveEvent( QMouseEvent * e )
if ( deltaY )
{
d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) );
d->blockPixmapsRequest = true;
updateZoom( ZoomRefreshCurrent );
d->blockPixmapsRequest = false;
viewport()->repaint();
}
return;
@ -4314,8 +4316,7 @@ static void slotRequestPreloadPixmap( Okular::DocumentObserver * observer, const
void PageView::slotRequestVisiblePixmaps( int newValue )
{
// if requests are blocked (because raised by an unwanted event), exit
if ( d->blockPixmapsRequest || d->viewportMoveActive ||
( QApplication::mouseButtons () & Qt::MidButton ) )
if ( d->blockPixmapsRequest || d->viewportMoveActive )
return;
// precalc view limits for intersecting with page coords inside the loop