mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:35:21 +00:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6aea7318f3
commit
002b7bf4ff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user