Commit f09df0aa authored by Albert Astals Cid's avatar Albert Astals Cid

Don't let people zoomin/out past the "range of values"

BUGS: 338452
FIXED-IN: 4.14.1
parent b98f1e93
......@@ -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;
......
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