feat(dialogs): reopen file pickers in the last-used directory
Every rfd dialog result funnels through sys::handle_path, which now records the picked file's folder (persisted to the config dir), and all pickers are built via sys::file_dialog(), seeded with that folder. Save-As keeps the current tab's own directory as the first choice and falls back to the remembered one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e8411c1b6d
commit
e78ad7884d
7 changed files with 78 additions and 15 deletions
|
|
@ -100,7 +100,7 @@ pub fn export_pdf(
|
|||
/// Show a PDF save-file dialog and return the chosen path (or None if cancelled).
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub async fn pick_pdf_path_owned(stem: String) -> Option<std::path::PathBuf> {
|
||||
rfd::AsyncFileDialog::new()
|
||||
crate::sys::file_dialog()
|
||||
.set_title("Export as PDF")
|
||||
.set_file_name(&format!("{stem}.pdf"))
|
||||
.add_filter("PDF Files", &["pdf"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue