ElyPDF: quick strokes and clicks queue behind the last edit instead of being refused (P-05)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 22:02:50 -04:00
1 parent 4cec71703b
commit d7a4c37c1f
7 files changed
+82 -10

No files matched your search

+4 -3
View File
@@ -92,15 +92,16 @@ impl PdfView {
rgb: 0,
bx: [at[0], at[1], self.sizes[page].0 - at[0]],
};
self.settled_edit("placing a typed signature", cx, move |worker, doc| match worker.put_text(doc, page, &writing, 0.0)? {
let write = move |worker: &mut ely_pdf_engine::Worker, doc| match worker.put_text(doc, page, &writing, 0.0)? {
Wrote::Done(mark) => Ok(mark),
Wrote::Missing(c) => Err(io::Error::new(io::ErrorKind::InvalidInput, format!("the font has no “{c}”"))),
Wrote::Preview(..) => Err(io::Error::other("a preview where a write was asked")),
});
};
self.edit_at("placing a typed signature", write, cx);
}
Stamp::Picture { path, aspect } => {
let at = placed(aspect, rect, click);
self.settled_edit("placing a signature picture", cx, move |worker, doc| worker.add_image(doc, page, &path, at));
self.edit_at("placing a signature picture", move |worker, doc| worker.add_image(doc, page, &path, at), cx);
}
}
}