From b58b339283a57ae9a44939a353dc659cb9946621 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 21 Dec 2009 13:02:28 +0100 Subject: [PATCH] [libview] Initialize view from model when a new model is set --- libview/ev-view.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libview/ev-view.c b/libview/ev-view.c index 7a3a6dc2..79a7c1cb 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5294,6 +5294,16 @@ ev_view_set_model (EvView *view, g_object_unref (view->model); } view->model = g_object_ref (model); + + /* Initialize view from model */ + view->rotation = ev_document_model_get_rotation (view->model); + view->sizing_mode = ev_document_model_get_sizing_mode (view->model); + view->scale = ev_document_model_get_scale (view->model); + view->continuous = ev_document_model_get_continuous (view->model); + view->dual_page = ev_document_model_get_dual_page (view->model); + view->fullscreen = ev_document_model_get_fullscreen (view->model); + ev_view_document_changed_cb (view->model, NULL, view); + g_signal_connect (view->model, "notify::document", G_CALLBACK (ev_view_document_changed_cb), view); -- 2.43.5