Bug 289010 - Minimized Navigation Panel pops up when PDF is auto-reloaded
Summary: Minimized Navigation Panel pops up when PDF is auto-reloaded
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.13.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 23:00 UTC by Elvis Stansvik
Modified: 2011-12-27 23:50 UTC (History)
1 user (show)

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


Attachments
The test document. (460.73 KB, application/pdf)
2011-12-14 23:00 UTC, Elvis Stansvik
Details
Screenshot before touching test.pdf (57.41 KB, image/png)
2011-12-14 23:00 UTC, Elvis Stansvik
Details
Screenshot after touching test.pdf (57.88 KB, image/png)
2011-12-14 23:00 UTC, Elvis Stansvik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elvis Stansvik 2011-12-14 23:00:03 UTC
Created attachment 66763 [details]
The test document.

Version:           0.13.2 (using KDE 4.7.3) 
OS:                Linux

The Navigation Panel pops up when a PDF is reloaded due to being changed. I believe it might have something to do with the PDF containing a TOC. See the attached test document and before/after screenshots. The document was created by XeLaTeX from TeX Live.

Perhaps the logic could be changed so that Okular will ignore PDF that requests this if it's just an auto-reload and not an initial open.

Reproducible: Always

Steps to Reproduce:
1) Open the attached test.pdf.
2) Make sure the Navigation Panel is minimized (not completely hidden through Settings!)
3) $ touch test.pdf

Actual Results:  
The Navigation Panel pops up after the PDF has been auto-reloaded.

Expected Results:  
The Navigation Panel should stay hidden.

I'm actually using 1.13.3 on KDE SC 4.7.4, but I couldn't pick those in Bugzilla.
Comment 1 Elvis Stansvik 2011-12-14 23:00:27 UTC
Created attachment 66764 [details]
Screenshot before touching test.pdf
Comment 2 Elvis Stansvik 2011-12-14 23:00:47 UTC
Created attachment 66765 [details]
Screenshot after touching test.pdf
Comment 3 Albert Astals Cid 2011-12-19 23:09:51 UTC
Hmmmm, I am not sure it is a bug, the PDF has the "OpenTOC" flag that asks for the Table Of Contents to be opened when the file is opened, as "reloading" is nothing else than "opening the file again" we show the table of contents again.

What do you say, can i close this as not a bug?
Comment 4 Elvis Stansvik 2011-12-23 13:59:08 UTC
Hi Albert,

Sorry for the late reply.

I understand now that technically "reloading" is simply a close+open, and that Okular will therefore respect the OpenTOC flag and show the TOC (which means showing a collapsed sidebar).

I have a suggestion for a compromise though. If you take a look at review 103517 [1] which I just posted. This patch will make Okular remember the collapsed state of the sidebar when a file is automatically reloaded due to a file change, while still respecting the OpenTOC when a file is opened for the first time (just as before).

Would you be OK with such a compromise? I think that when a file is reloaded due to a file change, the UI should generally stay the same.

Best regards,
Elvis

[1] https://git.reviewboard.kde.org/r/103517/
Comment 5 Albert Astals Cid 2011-12-27 23:50:31 UTC
Git commit d066fb00044c90ea5f032e53485074e4d412b733 by Albert Astals Cid, on behalf of Elvis Stansvik.
Committed on 28/12/2011 at 00:49.
Pushed by aacid into branch 'KDE/4.8'.

Remember collapse state of sidebar when file is auto-reloaded
Related: bug 289010
REVIEW: 103517

M  +8    -2    part.cpp
M  +1    -0    part.h
M  +21   -11   ui/sidebar.cpp
M  +3    -0    ui/sidebar.h

http://commits.kde.org/okular/d066fb00044c90ea5f032e53485074e4d412b733