summaryrefslogtreecommitdiff
path: root/platform/ios/Classes/MuPageViewNormal.m
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-09-22 16:00:21 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-10-07 17:22:58 +0200
commit8e244f7e2add3606283c0c797d75067fd01ad740 (patch)
tree1d3d70646b637792865c0b14be37127eb5eef250 /platform/ios/Classes/MuPageViewNormal.m
parent170f35a5802ec7093b00fb2e39bbde3756516f15 (diff)
downloadmupdf-8e244f7e2add3606283c0c797d75067fd01ad740.tar.xz
Remove separate tmp/deleted/changed annotation lists.
Use a flag in the pdf_annot struct instead. Don't pass pdf_document to annotation edit functions.
Diffstat (limited to 'platform/ios/Classes/MuPageViewNormal.m')
-rw-r--r--platform/ios/Classes/MuPageViewNormal.m20
1 files changed, 11 insertions, 9 deletions
diff --git a/platform/ios/Classes/MuPageViewNormal.m b/platform/ios/Classes/MuPageViewNormal.m
index 496b62ce..f5afdcee 100644
--- a/platform/ios/Classes/MuPageViewNormal.m
+++ b/platform/ios/Classes/MuPageViewNormal.m
@@ -504,19 +504,21 @@ static rect_list *updatePage(fz_document *doc, fz_page *page)
fz_try(ctx)
{
pdf_document *idoc = pdf_specifics(ctx, doc);
-
if (idoc)
{
- fz_annot *annot;
+ pdf_page *page = (pdf_page*)page;
+ pdf_annot *pannot;
- pdf_update_page(ctx, idoc, (pdf_page *)page);
- while ((annot = (fz_annot *)pdf_poll_changed_annot(ctx, idoc, (pdf_page *)page)) != NULL)
+ pdf_update_page(ctx, (pdf_page *)page);
+ for (pannot = pdf_first_annot(ctx, ppage); pannot; pannot = pdf_next_annot(ctx, pannot))
{
- rect_list *node = fz_malloc_struct(ctx, rect_list);
-
- fz_bound_annot(ctx, annot, &node->rect);
- node->next = list;
- list = node;
+ if (pannot->changed)
+ {
+ rect_list *node = fz_malloc_struct(ctx, rect_list);
+ fz_bound_annot(ctx, (fz_annot*)pannot, &node->rect);
+ node->next = list;
+ list = node;
+ }
}
}
}