Bug 111255 - Middle-click zoom stops working after dragging off-screen
Summary: Middle-click zoom stops working after dragging off-screen
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 02:49 UTC by Daniel Herring
Modified: 2006-09-02 13:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();