made export remember where the last save location was

This commit is contained in:
grimsace
2026-04-20 14:04:59 -05:00
parent 5227aa4b4d
commit d7cf07756d
3 changed files with 24 additions and 2 deletions
+13
View File
@@ -174,6 +174,19 @@ impl eframe::App for DungeonApp {
return;
}
};
// Update the last export path in settings to remember the directory.
match &target {
exporter::ExportTarget::File(path) => {
if let Some(parent) = path.parent() {
self.settings.last_export_path = Some(parent.to_string_lossy().to_string());
}
}
exporter::ExportTarget::Folder(path) => {
self.settings.last_export_path = Some(path.to_string_lossy().to_string());
}
}
let layout = self.layout.clone();
let settings = self.settings.clone();
let (tx, rx) = mpsc::channel();