mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 14:06:02 +01:00
Set position on document load only if no page was specified
This commit is contained in:
parent
1d398dfaf0
commit
42a8382a45
1 changed files with 6 additions and 3 deletions
|
@ -786,9 +786,12 @@ document_open(zathura_t* zathura, const char* path, const char* password,
|
||||||
gtk_widget_show(zathura->pages[page_id]);
|
gtk_widget_show(zathura->pages[page_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set position */
|
/* Set page */
|
||||||
page_set(zathura, zathura_document_get_current_page_number(document));
|
page_set(zathura, zathura_document_get_current_page_number(document));
|
||||||
if (file_info.position_x != 0 || file_info.position_y != 0) {
|
|
||||||
|
/* Set position (only if restoring from history file) */
|
||||||
|
if (file_info.current_page == zathura_document_get_current_page_number(document)
|
||||||
|
&& (file_info.position_x != 0 || file_info.position_y != 0)) {
|
||||||
position_set(zathura, file_info.position_x, file_info.position_y);
|
position_set(zathura, file_info.position_x, file_info.position_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue