From 002b7bf4ff3cc1eb46f281645014cbd2bb3caeae Mon Sep 17 00:00:00 2001 From: mtlcl410 <2368091+mtlcl410@users.noreply.github.com> Date: Sat, 31 Oct 2026 09:17:14 +0800 Subject: [PATCH] M5: opening, closing or moving a pop-up keeps the page's raster (#2137) Review on #2137 (nitpick): a SetAnnotationPopup edit marked its page stale, so its tiles were rendered again, its text cache dropped and its selection cleared, though nothing in the raster changes: the window is drawn over the page and a /Popup annotation paints nothing. Edits that also change the comment (a batch) still invalidate as before. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv --- crates/ui-egui/src/editing.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/editing.rs b/crates/ui-egui/src/editing.rs index b26e2aed42..f1c9ba7949 100644 --- a/crates/ui-egui/src/editing.rs +++ b/crates/ui-egui/src/editing.rs @@ -146,8 +146,12 @@ impl PdfCraftApp { view.move_background.committed(&edit, doc.edit_generation()); view.text_background.committed(&edit); if let Some(page) = comment_page(&edit).or_else(|| content_page(&edit)) { - // Comment and content edits change one page: keep every other raster. - view.page_changed(page); + // Comment and content edits change one page: keep every other raster. Opening, + // closing or moving a pop-up changes none: the window is drawn over the page, and + // a /Popup annotation paints nothing in the raster (ISO 32000-2 ยง12.5.6.14). + if !matches!(edit, Edit::SetAnnotationPopup { .. }) { + view.page_changed(page); + } } else if let Some(form_before) = form_before && doc.info.pages.len() == page_count_before && doc.xfa.is_some() == had_xfa