Commit 75978a08 authored by twanvl's avatar twanvl

bugfix: strip special characters from set name before showing save file dialog.

parent 43b37399
......@@ -446,7 +446,7 @@ bool SetWindow::askSaveAndContinue() {
try {
if (set->needSaveAs()) {
// need save as
wxFileDialog dlg(this, _TITLE_("save set"), settings.default_set_dir, set->short_name, export_formats(*set->game), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
wxFileDialog dlg(this, _TITLE_("save set"), settings.default_set_dir, clean_filename(set->short_name), export_formats(*set->game), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() == wxID_OK) {
settings.default_set_dir = dlg.GetDirectory();
export_set(*set, dlg.GetPath(), dlg.GetFilterIndex());
......@@ -581,7 +581,7 @@ void SetWindow::onFileSave(wxCommandEvent& ev) {
}
void SetWindow::onFileSaveAs(wxCommandEvent&) {
wxFileDialog dlg(this, _TITLE_("save set"), settings.default_set_dir, set->short_name, export_formats(*set->game), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
wxFileDialog dlg(this, _TITLE_("save set"), settings.default_set_dir, clean_filename(set->short_name), export_formats(*set->game), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() == wxID_OK) {
settings.default_set_dir = dlg.GetDirectory();
export_set(*set, dlg.GetPath(), dlg.GetFilterIndex());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment