remember import directory

This commit is contained in:
GenevensiS
2026-01-04 18:41:45 +01:00
parent d113e30423
commit 8c889cf0aa
4 changed files with 10 additions and 4 deletions
+4 -2
View File
@@ -89,9 +89,11 @@ void AddJSONWindow::onJSONTypeChange(wxCommandEvent&) {
}
void AddJSONWindow::onBrowseFiles(wxCommandEvent&) {
wxFileDialog* dlg = new wxFileDialog(this, _TITLE_("add card json file"), settings.default_set_dir, _(""), _("JSON files|*.json|All files (*.*)|*"), wxFD_OPEN);
wxFileDialog* dlg = new wxFileDialog(this, _TITLE_("add card json file"), settings.default_import_dir, _(""), _("JSON files|*.json|All files (*.*)|*"), wxFD_OPEN);
if (dlg->ShowModal() == wxID_OK) {
file_path->SetValue(dlg->GetPath());
const String& path = dlg->GetPath();
file_path->SetValue(path);
settings.default_import_dir = wxPathOnly(path);
}
}