mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
remember import directory
This commit is contained in:
@@ -325,6 +325,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(Settings) {
|
|||||||
REFLECT(default_image_dir);
|
REFLECT(default_image_dir);
|
||||||
REFLECT(default_symbol_dir);
|
REFLECT(default_symbol_dir);
|
||||||
REFLECT(default_export_dir);
|
REFLECT(default_export_dir);
|
||||||
|
REFLECT(default_import_dir);
|
||||||
REFLECT(set_window_maximized);
|
REFLECT(set_window_maximized);
|
||||||
REFLECT(set_window_width);
|
REFLECT(set_window_width);
|
||||||
REFLECT(set_window_height);
|
REFLECT(set_window_height);
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ public:
|
|||||||
String default_image_dir; ///< Where to look for images to import
|
String default_image_dir; ///< Where to look for images to import
|
||||||
String default_symbol_dir; ///< Where to look for .mse-symbol files
|
String default_symbol_dir; ///< Where to look for .mse-symbol files
|
||||||
String default_export_dir; ///< Where to export to by default
|
String default_export_dir; ///< Where to export to by default
|
||||||
|
String default_import_dir; ///< Where to import to by default
|
||||||
|
|
||||||
// --------------------------------------------------- : Set window
|
// --------------------------------------------------- : Set window
|
||||||
bool set_window_maximized;
|
bool set_window_maximized;
|
||||||
|
|||||||
@@ -66,9 +66,11 @@ void AddCSVWindow::onSeparatorTypeChange(wxCommandEvent&) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AddCSVWindow::onBrowseFiles(wxCommandEvent&) {
|
void AddCSVWindow::onBrowseFiles(wxCommandEvent&) {
|
||||||
wxFileDialog* dlg = new wxFileDialog(this, _TITLE_("add card csv file"), settings.default_set_dir, _(""), _("CSV files|*.csv;*.tsv|All files (*.*)|*"), wxFD_OPEN);
|
wxFileDialog* dlg = new wxFileDialog(this, _TITLE_("add card csv file"), settings.default_import_dir, _(""), _("CSV files|*.csv;*.tsv|All files (*.*)|*"), wxFD_OPEN);
|
||||||
if (dlg->ShowModal() == wxID_OK) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,9 +89,11 @@ void AddJSONWindow::onJSONTypeChange(wxCommandEvent&) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AddJSONWindow::onBrowseFiles(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) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user