diff options
author | Paul Gardiner <paul@Pauls-Laptop-Mac.local> | 2018-06-01 19:26:10 +0100 |
---|---|---|
committer | Paul Gardiner <paul@Pauls-Laptop-Mac.local> | 2018-06-01 19:26:10 +0100 |
commit | 4d473e7f6a6ec72265270c03a26b48e27db11282 (patch) | |
tree | 7217b814bf31f3cd44c3773415bb3de06e013e1f /source | |
parent | a7dc8ede59f63a5d4c4fb6dd845da328645f11a8 (diff) | |
download | mupdf-4d473e7f6a6ec72265270c03a26b48e27db11282.tar.xz |
Fix loss of reference to focussed annotation when rereading annotations
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-annot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index d142d454..cb09f84c 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -420,6 +420,7 @@ pdf_annot *pdf_new_annot(fz_context *ctx, pdf_page *page, pdf_obj *obj) void pdf_load_annots(fz_context *ctx, pdf_page *page, pdf_obj *annots) { + pdf_document *doc = page->doc; pdf_annot *annot; pdf_obj *subtype; int i, n; @@ -445,6 +446,9 @@ pdf_load_annots(fz_context *ctx, pdf_page *page, pdf_obj *annots) fz_catch(ctx) fz_warn(ctx, "could not update appearance for annotation"); + if (doc->focus_obj == obj) + doc->focus = annot; + *page->annot_tailp = annot; page->annot_tailp = &annot->next; } |