mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-14 11:53:21 +00:00
Don't let people zoomin/out past the "range of values"
BUGS: 338452 FIXED-IN: 4.14.1
This commit is contained in:
parent
b98f1e9338
commit
f09df0aa05
|
@ -3663,10 +3663,14 @@ void PageView::updateZoom( ZoomMode newZoomMode )
|
|||
QVector<float>::iterator i;
|
||||
if ( newZoomMode == ZoomOut )
|
||||
{
|
||||
if (newFactor <= zoomValue.first())
|
||||
return;
|
||||
i = qLowerBound(zoomValue.begin(), zoomValue.end(), newFactor) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newFactor >= zoomValue.last())
|
||||
return;
|
||||
i = qUpperBound(zoomValue.begin(), zoomValue.end(), newFactor);
|
||||
}
|
||||
const float tmpFactor = *i;
|
||||
|
|
Loading…
Reference in a new issue