at least stay on the same page after the rotation

This commit is contained in:
Sebastian Ramacher 2012-02-08 22:06:33 +01:00
parent a51183cd66
commit aebab3e73c

View File

@ -320,6 +320,8 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
zathura_t* zathura = session->global.data;
g_return_val_if_fail(zathura->document != NULL, false);
unsigned int page_number = zathura->document->current_page_number;
/* update rotate value */
zathura->document->rotate = (zathura->document->rotate + 90) % 360;
@ -327,6 +329,8 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
/* XXX: we don't need to rerender, only to resize the widgets and redraw */
render_all(zathura);
page_set_delayed(zathura, page_number);
return false;
}