[okular] [Bug 498038] Mouse wheel behavior beyond document limits in Okular
Albert Astals Cid
bugzilla_noreply at kde.org
Thu Jan 2 22:03:47 GMT 2025
https://bugs.kde.org/show_bug.cgi?id=498038
Albert Astals Cid <aacid at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
|hics/okular/-/commit/caedb8 |hics/okular/-/commit/9f37dd
|9a513fc204e13f5b384e8ed236b |5d9b7e7b2023bb511c191d45870
|bcb3bfa |c2117d4
--- Comment #4 from Albert Astals Cid <aacid at kde.org> ---
Git commit 9f37dd5d9b7e7b2023bb511c191d45870c2117d4 by Albert Astals Cid, on
behalf of Kai Shen.
Committed on 02/01/2025 at 22:03.
Pushed by aacid into branch 'release/24.12'.
Fix scroll down/up at the last/first page in single page, non-continuous mode
## The bug I encountered
In single page, non-continuous mode, open a PDF file. If you scroll up at the
first page and then scroll down, the document will not go to the second page.
The same when scroll down at the last page and then scroll up.
## What did I find
I find that, the code in `part/pageview.cpp:3271-3299` uses
`singlePageWheelAccumulatedDelta` to accumulate the scroll behavior. But if we
scroll up at the first page, the data will be accumulated positive. And then,
if we scroll down, the data will go back to zero first, and then we can turn to
the next page with another 'scroll down' event.
## What did I do
I just **clear the accumulated data** when it is enough to perform 'a real
scroll', even if the target page is invalid (such as the previous page of the
first page).
(cherry picked from commit caedb89a513fc204e13f5b384e8ed236bbcb3bfa)
M +24 -20 part/pageview.cpp
https://invent.kde.org/graphics/okular/-/commit/9f37dd5d9b7e7b2023bb511c191d45870c2117d4
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list