GNOME Bugzilla – Bug 732834
Evince jumps to last bookmarked page when I create a bookmark
Last modified: 2017-09-06 07:43:54 UTC
Whenever I create a bookmark, Evince moves the view to the last page that has been bookmarked. That isn't helpful. The view should just remain on the current page, i.e. the one that is being bookmarked.
The same thing happens when one deletes a bookmark. The problem seems to lie in ev_sidebar_bookmarks_update(), which is called every time a bookmark is added or deleted. When a bookmark is added, the tree_view’s model is cleared and then repopulated with the list of bookmarks. However, with every bookmark deleted a GtkTreeSelection->changed signal is emitted, and the handler for that signal (ev_sidebar_bookmarks_selection_changed) changes the page accordingly. Consequently, the current page actually iterates through the bookmarked pages and ends up at the last bookmarked page. A simple patch would be to block the "changed" signal when clearing the tree_view's model.
Created attachment 358490 [details] [review] Proposed fix
Tested that the fix works. It also fixes bug #784138 (https://bugzilla.gnome.org/show_bug.cgi?id=784138)
*** Bug 784138 has been marked as a duplicate of this bug. ***
Comment on attachment 358490 [details] [review] Proposed fix Thanks, pushed with minor cosmetic changes.