app: wire web export, preview, and print flows through the plot UI

- plot dialog: the web build defaults to 'Save to PDF file...' (its only
  output choice); native dropdowns and defaults are untouched.
- on_plot_dlg_commit forces to_file on wasm so a stale page setup can no
  longer route the web build into the (unreachable) printer path; both
  preview branches now go through preview_page_pdf, which is identical to
  the old inline temp-PDF + OS-viewer flow on desktop.
- Print ribbon / PRINTALL on wasm render the PDF and open it in a tab
  instead of erroring; PrintAllPdf picks a virtual path and downloads.
- pdf_plot_options maps the dialog's Quality dropdown into PdfPlotOptions.

(cherry picked from commit 892d693d2d)
This commit is contained in:
Afonsop authored and Hakan Seven committed 2026-10-12 12:02:04 +03:00
1 parent 978000d37c
commit 38f0e2b25f
4 files changed
+117 -55

No files matched your search

+4 -5
View File
@@ -9936,11 +9936,10 @@ impl OpenCADStudio {
}
#[cfg(target_arch = "wasm32")]
{
let _ = stem;
self.command_line.push_error(
crate::t!("PDF export is not available in the web version.").as_ref(),
);
Task::none()
Task::perform(
crate::io::pdf_export::pick_pdf_path_owned(stem),
Message::PrintAllPdfPath,
)
}
}
Message::PrintAllPdfPath(None) => Task::none(),