From e0ccccb41278b9c6dcc27810522d716629798f87 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Mon, 12 Feb 2018 10:32:39 +0000 Subject: Fix changed annotations not marked as dirty Events such as mouse up/down can cause a change to the appearance of a widget annotation. That the change has happened is flagged by incrementing the iteration count of the appearance stream. The widget is then recognised as dirty when the ap_iteration value, stored in the pdf_widget structure, differs from the appearance stream's actual iteration. This commit removes a line of code that wrongly reset the iteration to 1 each time load_or_create_form was called, hence masking the widget being dirty. --- source/pdf/pdf-appearance.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index 4d243e3e..685ef8dc 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -1012,8 +1012,6 @@ static pdf_xobject *load_or_create_form(fz_context *ctx, pdf_document *doc, pdf_ form = pdf_load_xobject(ctx, doc, formobj); - form->iteration = 1; - copy_resources(ctx, pdf_xobject_resources(ctx, form), pdf_get_inheritable(ctx, doc, obj, PDF_NAME_DR)); } fz_always(ctx) -- cgit v1.2.3