[Okular-devel] [okular] [Bug 313147] New: Table of contents gets cleared during reload (and after reload too, if cancelled by user)
Fabio D'Urso
fabiodurso at hotmail.it
Sat Jan 12 20:22:28 UTC 2013
https://bugs.kde.org/show_bug.cgi?id=313147
Bug ID: 313147
Summary: Table of contents gets cleared during reload (and
after reload too, if cancelled by user)
Classification: Unclassified
Product: okular
Version: 0.16.60
Hardware: Other
OS: Linux
Status: CONFIRMED
Severity: normal
Priority: NOR
Component: general
Assignee: okular-devel at kde.org
Reporter: fabiodurso at hotmail.it
If I open, edit and reload a PDF document both with embedded annotations and
table of contents ( e.g. http://www.pdfill.com/example/pdf_commenting_new.pdf
), Okular asks me if I want to save changes or not*.
While the message box is open, in the background I can see that the table of
contents has been cleared, and if I press Cancel the document stays open with
an empty TOC.
* = This message box is only shown with poppler >= 0.20
Reproducible: Always
Steps to Reproduce:
1. Open pdf_commenting_new.pdf and show the TOC panel
2. Do some modification (e.g. create a new annotation)
3. Press Reload. A "Save changes?" prompt will be shown
4. Watch the TOC disappear in the background
5. Press Cancel
6. The document stays open but the TOC is empty
The issue is that we're calling m_toc->prepareForReload() in
Part::slotDoFileDirty() *before* Part::queryClose() is executed.
TOC::prepareForReload() internally replaces the current TOCModel with an empty
one, and that's why the table of contents disappears.
This bug should be easy to fix, but I haven't done it myself because it touches
the same code as bug 313146, which is more critical.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list