diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-07-02 12:07:04 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-07-05 15:32:34 +0200 |
commit | e792804dcfa3c8d868d58a28c421feb17dfc0b7e (patch) | |
tree | c2bcdc48965142e52510a5e9a8a9f5fcb6e52520 /platform/gl/gl-annotate.c | |
parent | 4cda8ae62880a807a3b19d68b5407eafeea6e338 (diff) | |
download | mupdf-e792804dcfa3c8d868d58a28c421feb17dfc0b7e.tar.xz |
gl: Poll changed annots with pdf_update_page, and clear after rendering.
Diffstat (limited to 'platform/gl/gl-annotate.c')
-rw-r--r-- | platform/gl/gl-annotate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/gl/gl-annotate.c b/platform/gl/gl-annotate.c index 9acf7746..92458824 100644 --- a/platform/gl/gl-annotate.c +++ b/platform/gl/gl-annotate.c @@ -357,7 +357,7 @@ static void do_annotate_contents(void) pdf_set_annot_contents(ctx, selected_annot, input.text); } -static void do_widget_value() +static void do_widget_value(void) { int ff, type; char *value; @@ -380,7 +380,8 @@ static void do_widget_value() if (ui_input(&input, 0, (ff & Ff_Multiline) ? 5 : 1) >= UI_INPUT_EDIT) { pdf_field_set_value(ctx, selected_annot->page->doc, selected_annot->obj, input.text); - pdf_dirty_annot(ctx, selected_annot); + if (pdf_update_page(ctx, selected_annot->page)) + render_page(); } } else if (type == PDF_WIDGET_TYPE_COMBOBOX || type == PDF_WIDGET_TYPE_LISTBOX) @@ -396,7 +397,8 @@ static void do_widget_value() if (choice >= 0) { pdf_field_set_value(ctx, selected_annot->page->doc, selected_annot->obj, options[choice]); - pdf_dirty_annot(ctx, selected_annot); + if (pdf_update_page(ctx, selected_annot->page)) + render_page(); } fz_free(ctx, value); fz_free(ctx, options); |