summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-10 01:31:42 +0100
committerinfirit <[email protected]>2014-12-10 01:31:42 +0100
commit574c93458607dc2a4331b819a8761893c3f2d1fb (patch)
treeb40374b23effaa43bdcbf60cdf349682aea5e5eb /shell
parent36f3ee27bcfcae71eb52f96dce27971e7b5a2107 (diff)
downloadatril-574c93458607dc2a4331b819a8761893c3f2d1fb.tar.bz2
atril-574c93458607dc2a4331b819a8761893c3f2d1fb.tar.xz
Remember the current page when document is reloaded in presentation mode
Taken from evince commit: 64f2cca8898d08f2b8c549d98a9c5869f7035e3f From: Carlos Garcia Campos <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=637594
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index e11dcc8f..822cfd80 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1585,8 +1585,15 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *document)
}
#endif
if (EV_WINDOW_IS_PRESENTATION (ev_window) && document->iswebdocument == FALSE) {
+ gint current_page;
+
+ current_page = ev_view_presentation_get_current_page (
+ EV_VIEW_PRESENTATION (ev_window->priv->presentation_view));
gtk_widget_destroy (ev_window->priv->presentation_view);
ev_window->priv->presentation_view = NULL;
+
+ /* Update the model with the current presentation page */
+ ev_document_model_set_page (ev_window->priv->model, current_page);
ev_window_run_presentation (ev_window);
} else if ( EV_WINDOW_IS_PRESENTATION (ev_window) && document->iswebdocument == TRUE )
{