fix(plot): parent PDF save dialog

Remove the temporary EXPORTPDF <path> fallback now that native save requests are tied to the main window.\n\nCloses #537
This commit is contained in:
Hakan Seven committed 2026-07-28 19:23:29 +03:00
1 parent d77eb8f419
commit 99dbc8254d
5 files changed
+66 -117

No files matched your search

+14
View File
@@ -131,6 +131,20 @@ pub fn file_dialog() -> rfd::AsyncFileDialog {
}
}
/// Blocking native file dialog seeded with the last-used directory.
///
/// Use this through `iced::window::run` when the picker needs the main
/// window's raw handle. Portal-based desktops can otherwise reject or lose a
/// parentless save request without ever showing a dialog (#537).
#[cfg(not(target_arch = "wasm32"))]
pub fn blocking_file_dialog() -> rfd::FileDialog {
let dlg = rfd::FileDialog::new();
match crate::config::last_dialog_dir() {
Some(dir) => dlg.set_directory(dir),
None => dlg,
}
}
/// Web: no filesystem paths, nothing to remember.
#[cfg(target_arch = "wasm32")]
pub fn file_dialog() -> rfd::AsyncFileDialog {