Fix page-jumping-back-issue commonly encountered when in presentation mode
Review Request #130171 - Created July 3, 2017 and updated
This fixes an issue I've commonly encountered while quickly working myself through large PDFs with many pages (such as this).
Steps to reproduce the issue:
- Open Okular
- For easily reproducing the issue change Settings ? Performance ? Memory Usage to Greedy (the issue can be reproduced without it, but it's harder an alot more random)
- Open a PDF with many pages
- Immidiately go to presentation mode (Ctrl+Shift+P)
- Click on the screen or press the left-arrow keyboard button
- The next slide is shown
- The next slide is indeed shown for a split second before the one is sent back to the first slide (this keeps being the case until all slides have been preloaded, then it stops)
- Interestingly enough (and I frankly have no idea why) everything works normally if one quickly double-clicks to skip forward by two slides, slides can be viewed normally after that as long as you don't go back to the second slide again…?
This patch fixes the problematic behaviour by removing code that looks its a bogus fixi from something that shouldn't be a problem… maybe.
Unfortunately the one attached comment isn't helpful at all in describing what this check was originally supposed to do – just like the commit message for that change (obtained through
commit d2d2fa3b2a4fa8f4b554b87ec13ee5a15b64f35d Author: Mailson Menezes <email@example.com> Date: Sun Nov 11 23:09:12 2012 -0300 Refactoring PageView
I therefor can only hope that this solution doesn't break anything. Guidance of somebody with in-depth knowledge of the code-base would be apprechiated on this. :-)
Loaded a few different PDFs that had previously exibited the described behaviour and verfied that they are fixed now. Also scrolled through them in non-presentation mode, to verify that nothing else appears to be broken now.