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
|
|
@ -845,7 +845,7 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
|||
let close = self.close_save_dialog_window();
|
||||
let pick = Task::perform(
|
||||
async move {
|
||||
let mut dlg = rfd::AsyncFileDialog::new()
|
||||
let mut dlg = crate::sys::file_dialog()
|
||||
.set_title("Save Drawing As")
|
||||
.set_file_name(default_name)
|
||||
.add_filter(filter_label, &[filter_ext]);
|
||||
|
|
@ -2204,7 +2204,7 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
|||
.unwrap_or("export.ctb".into());
|
||||
Task::perform(
|
||||
async move {
|
||||
rfd::AsyncFileDialog::new()
|
||||
crate::sys::file_dialog()
|
||||
.set_title("Save Plot Style Table")
|
||||
.set_file_name(&default_name)
|
||||
.add_filter("Plot Style Files", &["ctb", "stb", "CTB", "STB"])
|
||||
|
|
|
|||
Loading…
Reference in a new issue