tl;dr: open a PDF with links, highlight a few lines using the "Highlighter" annotation tool, press Ctrl+S and observe that hovering over links no longer changes the cursor, and clicking on them has no effect. Detailed steps to reproduce: 1. Download a PDF with links, e.g. https://www.nature.com/articles/s41598-018-23534-9.pdf 2. Open it in Okular. 3. Make sure that the links work (e.g. the superscript references or the authors' emails). 4. Press F6, then 4. 5. Select some text, for example, a sentence from the abstract. 6. Press Ctrl+S. 7. Note that the links no longer work, i.e. the cursor no longer changes shape when you hover over them, and clicking has no effect.
Confirmed with current git master on Debian testing.
Also confirmed for Okular master. If you reload the document with F5, links work again and the bug is gone. So it's not the file itself that gets corrupted. While the bug is active, in PageView::updateCursor const Okular::ObjectRect * linkobj = pageItem->page()->objectRect( Okular::ObjectRect::Action, nX, nY, pageItem->uncroppedWidth(), pageItem->uncroppedHeight() ); is executed, but linkobj always gets assigned with nullptr. Had no time to dig deeper yet.
Tobias can you have a look at https://phabricator.kde.org/D14752 ?
(In reply to Albert Astals Cid from comment #3) > Tobias can you have a look at https://phabricator.kde.org/D14752 ? Wow, that was fast. Yes I'll have a look within the next two or three days. @Oliver: Will need to do a small writeup for myself to understand how Alberts diff is working. I'll share it, then you can check if it's suitable as explanation in code comment or git commit message (the later is easy to find with git blame, would also be ok for me).
Original reporter here. I must say that your response time is very impressive, usually with open-source projects I have to wait for weeks or months for a fix. Great job!
Git commit 0a8d2f7f85750d3852f256ebc8f0e8c9bad9fd84 by Albert Astals Cid. Committed on 26/08/2018 at 23:09. Pushed by aacid into branch 'Applications/18.08'. Fix links being "lost" on save Summary: We need to regenerate the links when switching the file since we won't re-render the pages since we already have them and link generation is on page render Reviewers: tobiasdeiminger Reviewed By: tobiasdeiminger Subscribers: tobiasdeiminger, sander, okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D14752 M +19 -0 generators/poppler/generator_pdf.cpp https://commits.kde.org/okular/0a8d2f7f85750d3852f256ebc8f0e8c9bad9fd84
*** Bug 398542 has been marked as a duplicate of this bug. ***