Commit 7cdd1e77 authored by Abdo Roig-Maranges's avatar Abdo Roig-Maranges Committed by Sebastian Ramacher

refresh horizontal position in page_set

After page_set cb_view_hadjustment_changed must be called so that when
zoom-center is enabled, the page is recentered.
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 7f42ccbd
......@@ -333,9 +333,6 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t*
page_set(zathura, zathura_document_get_number_of_pages(zathura->document) - 1);
}
/* adjust horizontal position */
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
cb_view_hadjustment_changed(hadjustment, zathura);
zathura_jumplist_add(zathura);
return false;
......@@ -472,10 +469,6 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
page_set(zathura, new_page);
/* adjust horizontal position */
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
cb_view_hadjustment_changed(hadjustment, zathura);
return false;
}
......
......@@ -1031,6 +1031,9 @@ page_set(zathura_t* zathura, unsigned int page_id)
zathura_adjustment_set_value(view_hadjustment, offset.x);
zathura_adjustment_set_value(view_vadjustment, offset.y);
/* refresh horizontal adjustment, to honor zoom-center */
cb_view_hadjustment_changed(view_hadjustment, zathura);
statusbar_page_number_update(zathura);
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment