From c5a1dad275a9805505846b310248c9447f2cb6e5 Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Sun, 9 Jun 2019 19:24:08 +0100 Subject: [PATCH] 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". --- src/FreqWindow.cpp | 9 +++++++-- src/effects/Contrast.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FreqWindow.cpp b/src/FreqWindow.cpp index 80a908418..50f5ddb15 100644 --- a/src/FreqWindow.cpp +++ b/src/FreqWindow.cpp @@ -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; diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index 3c27898b9..790e5e931 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -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);