mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-18 16:41:14 +02:00
Fix for bug #983
Now we know why the "automatically add extension" stuff was commented on in the FileDialog at least. :-)
This commit is contained in:
@@ -328,18 +328,21 @@ wxString FileDialog::GetPath() const
|
||||
|
||||
if (!path.HasExt())
|
||||
{
|
||||
int filterIndex = GetFilterIndex();
|
||||
if (filterIndex != -1)
|
||||
{
|
||||
wxStringTokenizer tokenizer(m_patterns[filterIndex], wxT(";"));
|
||||
if (tokenizer.HasMoreTokens())
|
||||
if (!(m_dialogStyle & FD_NO_ADD_EXTENSION))
|
||||
{
|
||||
int filterIndex = GetFilterIndex();
|
||||
if (filterIndex != -1)
|
||||
{
|
||||
wxString extension = tokenizer.GetNextToken().AfterFirst(wxT('.'));
|
||||
if (extension.Right(2) == wxT("*"))
|
||||
wxStringTokenizer tokenizer(m_patterns[filterIndex], wxT(";"));
|
||||
if (tokenizer.HasMoreTokens())
|
||||
{
|
||||
extension = wxEmptyString;
|
||||
wxString extension = tokenizer.GetNextToken().AfterFirst(wxT('.'));
|
||||
if (extension.Right(2) == wxT("*"))
|
||||
{
|
||||
extension = wxEmptyString;
|
||||
}
|
||||
path.SetExt(extension);
|
||||
}
|
||||
path.SetExt(extension);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user