Bug 111255

Summary: Middle-click zoom stops working after dragging off-screen
Product: [Applications] kpdf Reporter: Daniel Herring <dherring>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Herring 2005-08-22 02:49:40 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Slackware Packages

The middle mouse button (aka scroll-wheel button) is a useful tool for zooming in KPDF.  By pressing it and moving the mouse up, one can zoom in; moving down zooms out.

Unfortunately, if the mouse cursor touches the top of the screen while the user is zooming, this feature stops working.  It does not reactivate until the user restarts KPDF.  The bottom and sides of the screen do not have this problem.  I suspect its something simple like a divide-by-zero error.
Comment 1 Dima Ryazanov 2006-09-01 08:12:57 UTC
Same here...

And it's extremely easy to reproduce.
Comment 2 Albert Astals Cid 2006-09-02 13:54:45 UTC
SVN commit 580022 by aacid:

Fix middle-click zoom not working after dragging to the top of the screen
BUG: 111255


 M  +1 -1      pageview.cpp  


--- branches/KDE/3.5/kdegraphics/kpdf/ui/pageview.cpp #580021:580022
@@ -758,7 +758,7 @@
         return;
 
     // if holding mouse mid button, perform zoom
-    if ( (e->state() & MidButton) && d->mouseMidStartY > 0 )
+    if ( (e->state() & MidButton) && d->mouseMidStartY >= 0 )
     {
         int deltaY = d->mouseMidStartY - e->globalPos().y();
         d->mouseMidStartY = e->globalPos().y();