Fix bug 387

Mac and Linux (correctly) allow files to be saved with an arbitrary
file extension, or no file extension at all. For the exported file
to be visible in the export dialog, the dialog must include an optional
wildcard for "All files".
This commit is contained in:
Steve Daulton 2019-06-09 19:24:08 +01:00
parent 9bb5723777
commit c5a1dad275
2 changed files with 8 additions and 3 deletions

View File

@ -1054,8 +1054,13 @@ void FreqWindow::OnExport(wxCommandEvent & WXUNUSED(event))
wxString fName = _("spectrum.txt");
fName = FileNames::SelectFile(FileNames::Operation::Export,
_("Export Spectral Data As:"),
wxEmptyString, fName, wxT("txt"), wxT("*.txt"), wxFD_SAVE | wxRESIZE_BORDER, this);
_("Export Spectral Data As:"),
wxEmptyString,
fName,
wxT("txt"),
_("Text files (*.txt)|*.txt|All files|*"),
wxFD_SAVE | wxRESIZE_BORDER,
this);
if (fName.empty())
return;

View File

@ -509,7 +509,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
wxEmptyString,
fName,
wxT("txt"),
wxT("*.txt"),
_("Text files (*.txt)|*.txt|All files|*"),
wxFD_SAVE | wxRESIZE_BORDER,
this);