Commit 67807b73 authored by Albert Astals Cid's avatar Albert Astals Cid

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
parent b069e355
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment