mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Make sure resolution is not inf
Fixes part of bug 205084 CCBUG: 205084 svn path=/trunk/KDE/kdegraphics/okular/; revision=1072172
This commit is contained in:
parent
ea7480e2a5
commit
edd82d80c6
|
@ -156,8 +156,8 @@ void DviGenerator::fillViewportFromAnchor( Okular::DocumentViewport &vp,
|
|||
|
||||
SimplePageSize ps = m_dviRenderer->sizeOfPage( vp.pageNumber );
|
||||
double resolution = 0;
|
||||
|
||||
resolution = (double)(pW)/ps.width().getLength_in_inch();
|
||||
if (ps.isValid()) resolution = (double)(pW)/ps.width().getLength_in_inch();
|
||||
else resolution = m_resolution;
|
||||
|
||||
double py = (double)anch.distance_from_top.getLength_in_inch()*resolution + 0.5;
|
||||
|
||||
|
|
Loading…
Reference in a new issue