[evince] pdf: Reset the annotation mapping when there are no more annotations



commit 06e91291faef0b0ffd0fd76e55aa56608565da8b
Author: Giselle Machado <gisellemnr src gnome org>
Date:   Fri Jun 27 17:32:24 2014 +0200

    pdf: Reset the annotation mapping when there are no more annotations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649044

 backend/pdf/ev-poppler.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 3b4ced1..785005e 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -3121,6 +3121,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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]