Bug 429924

Summary: Opening a non-available bookmark scrolls the current opened PDF to the bookmarked page number
Product: [Applications] okular Reporter: postix <postix>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: postix
Priority: NOR    
Version First Reported In: 1.11.3   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description postix 2020-12-02 12:33:28 UTC
SUMMARY

STEPS TO REPRODUCE
1. Create a bookmark for page 5 of a PDF "A"
2. Delete this PDF "A"
3. Open another PDF "B"
4. Try to open the bookmark created in 1.

OBSERVED RESULT

"Error - file could not be opened" dialog appears. Clicking on "OK" scrolls to the current PDF to the page number, bookmarked in "PDF A".

EXPECTED RESULT

No scrolling.


Operating System: Manjaro Linux
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.9.11-3-MANJARO
Comment 1 Bug Janitor Service 2020-12-02 14:29:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/327
Comment 2 Albert Astals Cid 2020-12-06 18:10:42 UTC
Git commit 4f2c2b27147b6ed410f5aaf68f351726e07822e4 by Albert Astals Cid.
Committed on 06/12/2020 at 17:33.
Pushed by aacid into branch 'release/20.12'.

Document::openRelativeFile: Double check the url changed when we asked to

If not, open did not succeed and the callers (for example open document
X in page A) would like to know so they don't have to do the "change to
part A" part.

M  +5    -5    core/document.cpp

https://invent.kde.org/graphics/okular/commit/4f2c2b27147b6ed410f5aaf68f351726e07822e4