mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 05:01:30 +00:00
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:
parent
b069e3557f
commit
67807b73b8
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue