diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-appearance.c | 7 | ||||
-rw-r--r-- | source/pdf/pdf-form.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index 67a01fa9..fb5b8343 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -1373,11 +1373,12 @@ void pdf_update_appearance(fz_context *ctx, pdf_annot *annot) } } -void +int pdf_update_annot(fz_context *ctx, pdf_annot *annot) { pdf_document *doc = annot->page->doc; pdf_obj *obj, *ap, *as, *n; + int changed = 0; /* TODO: handle form field updates without using the annot pdf_obj dirty flag */ obj = annot->obj; @@ -1415,4 +1416,8 @@ pdf_update_annot(fz_context *ctx, pdf_annot *annot) annot->has_new_ap = 1; } } + + changed = annot->has_new_ap; + annot->has_new_ap = 0; + return changed; } diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 8521d63d..d6969ce7 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -633,8 +633,7 @@ pdf_update_page(fz_context *ctx, pdf_page *page) int changed = 0; for (annot = page->annots; annot; annot = annot->next) { - pdf_update_annot(ctx, annot); - if (annot->has_new_ap) + if (pdf_update_annot(ctx, annot)) changed = 1; } return changed; |