[Okular-devel] [okular] [Bug 335819] Zooming in doesn't work on certain documents.

Markus Trippelsdorf octoploid at yandex.com
Tue Aug 19 10:02:01 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=335819

--- Comment #19 from Markus Trippelsdorf <octoploid at yandex.com> ---
The following hack fixes the issue for me:

diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 48d5d8df191c..eb1bd25226ae 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -55,6 +55,7 @@
 // system includes
 #include <math.h>
 #include <stdlib.h>
+#include <algorithm>

 // local includes
 #include "formwidgets.h"
@@ -3667,6 +3668,7 @@ void PageView::updateZoom( ZoomMode newZoomMode )
             }
             else
             {
+                newFactor=*std::lower_bound(zoomValue.begin(),
zoomValue.end(),newFactor );
                 i = qUpperBound(zoomValue.begin(), zoomValue.end(),
newFactor);
             }
             const float tmpFactor = *i;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list