mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Append selected extension to filenames for bug #387 on OSX.
This commit is contained in:
parent
a107b04d5c
commit
d4363ecb5b
@ -741,7 +741,21 @@ int FileDialog::ShowModal()
|
||||
return wxID_CANCEL;
|
||||
}
|
||||
|
||||
m_path = ConvertSlashInFileName(thePath);
|
||||
wxFileName fn = ConvertSlashInFileName(thePath);
|
||||
if (!fn.HasExt())
|
||||
{
|
||||
wxStringTokenizer tokenizer( myData.extensions[m_filterIndex], wxT(";"));
|
||||
if (tokenizer.HasMoreTokens())
|
||||
{
|
||||
wxString extension = tokenizer.GetNextToken();
|
||||
if (extension.Right(2) != wxT(".*") && extension.GetChar(0) == '*')
|
||||
{
|
||||
extension = extension.Mid(1);
|
||||
}
|
||||
}
|
||||
fn.SetExt(myData.extensions[m_filterIndex]);
|
||||
}
|
||||
m_path = fn.GetFullPath();
|
||||
m_paths.Add(m_path);
|
||||
m_fileName = wxFileNameFromPath(m_path);
|
||||
m_fileNames.Add(m_fileName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user