ElyPDF: a refused OCR text layer reports no success (P-09)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 23:31:19 -04:00
1 parent 2182b71f1f
commit 86bb0d4e1c
4 files changed
+41 -7

No files matched your search

+4 -2
View File
@@ -165,10 +165,12 @@ impl Viewer {
let Some(view) = self.tab(tab).map(|tab| tab.view.clone()).filter(|_| !pages.is_empty()) else {
return self.toast(summary, Severity::Info, cx);
};
self.on_same(&view, run.version, cx, |view, cx| {
let laid = self.on_same(&view, run.version, cx, |view, cx| {
view.edit("adding recognised text", move |worker, doc| worker.text_layer(doc, &pages, replace), cx)
});
self.toast(summary, Severity::Success, cx);
if laid {
self.toast(summary, Severity::Success, cx);
}
}
/// The OCR dialog: the ask, then the progress.