Bug 167233 - Resizing the main window changes the currently displayed page of a pdf document
Summary: Resizing the main window changes the currently displayed page of a pdf document
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.6.90
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-22 18:08 UTC by Christoph Burger-Scheidlin
Modified: 2008-07-22 18:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Burger-Scheidlin 2008-07-22 18:08:09 UTC
Version:           0.6.90 (using KDE 4.0.98)
Installed from:    Ubuntu Packages
OS:                Linux

When resizing the main window of a pdf file, okular changes the currently displayed page, increasing it when the window gets smaller and decreasing it when the window gets bigger.

I have used several pdfs to test this, but will explain this bug with http://stderr.org/doc/pbuilder/pbuilder-doc.pdf which contains 28 pages. My view mode is continuous with single pages. The zoom is set to "Fit Page" and the content side bar is open.

1. Open the document.
2. Maximize the okular window (or at least make it very large)
3. Scroll down to a page close to the end, say 25
4. Restore the okular window (or make it significantly smaller)

- This causes okular to now display page 28, the last page in the document

5. Maximize the okular window again (or increase the size again)

- This causes okular to now display page 16 (this is somewhat dependent on the difference between maximized size and initial size if the non-maximized window is only slightly smaller than my screen, okular jumps to page 26.

Note that this effect only occurs with high page numbers, it will not work on the first pages. Unfortunately I could not determine the exact cut-off.

My hunch is that it is related to the size of the scroll bar in the smaller window, such that okular tries to place the scroller at the same pixel offset that it was at before and thus reaches a different page. I have not looked at the code though and this is purely speculation.
Comment 1 Pino Toscano 2008-07-22 18:11:13 UTC
Reported already (bug #167232).