Commit 3d06f42b authored by Joanmarie Diggs's avatar Joanmarie Diggs

ev-view-accessible: call document_changed_cb when setting the model

When an application embedding an EvView reuses that view to display a new
document, the content of last page viewed from the previous document is
exposed to assistive technologies. In order to get the content of the
current document, the user must change pages. This problem resulted from
the assumption that the document would be set after the model was set.
parent 64bac664
......@@ -1113,6 +1113,11 @@ document_changed_cb (EvDocumentModel *model,
GParamSpec *pspec,
EvViewAccessible *accessible)
EvDocument *document = ev_document_model_get_document (model);
if (document == NULL)
clear_cache (accessible);
......@@ -1132,6 +1137,7 @@ ev_view_accessible_set_model (EvViewAccessible *accessible,
priv->model = g_object_ref (model);
document_changed_cb (model, NULL, accessible);
g_signal_connect (priv->model, "page-changed",
G_CALLBACK (page_changed_cb),
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