Bug 407883 - Previous/Next Bookmark actions not enabled/disabled correctly / do not cycle though bookmarks
Summary: Previous/Next Bookmark actions not enabled/disabled correctly / do not cycle ...
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.7.1
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-23 22:48 UTC by Laura David Hurka
Modified: 2019-05-24 20:52 UTC (History)
1 user (show)

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 Laura David Hurka 2019-05-23 22:48:57 UTC
SUMMARY
Just discovered that the context menu in the view area and the Bookmarks menu offer the two actions “Previous Bookmark” and “Next Bookmark”.
These two are enabled as soon as there are Bookmarks in the current document.
But they are enabled always, even if there is no previous or next bookmark. Clicking this action has no effect then.

STEPS TO REPRODUCE
1. Open a document with many pages
2. Create some bookmarks somewhere in the middle
3. Go to the end of the document
4. Open the context menu in the view area or the Bookmarks menu

OBSERVED RESULT
Both actions “Previous Bookmark” and “Next Bookmark” are enabled. Clicking “Next Bookmark” has no effect.

EXPECTED RESULT
Only Previous Bookmark is enabled, because there is no next bookmark. Alternative: Previous/Next Bookmark cycle though bookmarks, so Next Bookmark goes to the first bookmark.

SOFTWARE/OS VERSIONS
KDE Neon 5.15.5
KDE Plasma 5.58.0
Qt 5.12.0
Okular 1.7.1

ADDITIONAL INFORMATION
These actions are Okular::Part::m_prevBookmark and m_nextBookmark.
They are updated in Okular::Part::rebuildBookmarkMenu(), which assumes cycling behaviour.

To fix this, we need to decide whether these actions shall cycle though bookmarks or not.