From 3ada385fead55fa8f94afa128558348d8530dee6 Mon Sep 17 00:00:00 2001 From: Giselle Machado Date: Fri, 27 Jun 2014 17:32:24 +0200 Subject: pdf: Reset the annotation mapping when there are no more annotations https://bugzilla.gnome.org/show_bug.cgi?id=649044 origin commit: https://git.gnome.org/browse/evince/commit/?id=06e9129 --- backend/pdf/ev-poppler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 6f7b544e..20cd8e75 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -2849,6 +2849,8 @@ pdf_document_annotations_remove_annotation (EvDocumentAnnotations *document_anno if (mapping_list) { annot_mapping = ev_mapping_list_find (mapping_list, annot); ev_mapping_list_remove (mapping_list, annot_mapping); + if (ev_mapping_list_length (mapping_list) == 0) + g_hash_table_remove (pdf_document->annots, GINT_TO_POINTER (page->index)); } pdf_document->annots_modified = TRUE; -- cgit v1.2.1