summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorCarlos Garcia Campos <[email protected]>2013-07-28 10:45:02 +0200
committerraveit65 <[email protected]>2017-09-06 21:19:51 +0200
commite64064d40b451011dba2f891be454f65439df18d (patch)
treef71c426453b43e4be1f81c0ea9c9200b5d8ec8f9 /libview
parent3a0b8d483a94a64b9f9bdded688b4d870ab7a796 (diff)
downloadatril-e64064d40b451011dba2f891be454f65439df18d.tar.bz2
atril-e64064d40b451011dba2f891be454f65439df18d.tar.xz
libview: Update the current page also when pending scroll is to find a location
Pending scroll SCROLL_TO_FIND_LOCATION, can jump to another page if the location is in a different page. We should change the current page in the model in this case too. Origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=8709b39
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index e66b1f23..c76e5541 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -754,7 +754,8 @@ view_update_range_and_current_page (EvView *view)
}
}
- if (view->pending_scroll == SCROLL_TO_KEEP_POSITION) {
+ if (view->pending_scroll == SCROLL_TO_KEEP_POSITION ||
+ view->pending_scroll == SCROLL_TO_FIND_LOCATION) {
best_current_page = MAX (best_current_page, view->start_page);
if (best_current_page >= 0 && view->current_page != best_current_page) {