mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 08:39:46 +02:00
Bug1315 fix suggested by Bobby Kent (export file dialog problem)
This commit is contained in:
parent
cdc32e2311
commit
7ced70c210
@ -521,6 +521,7 @@ bool Exporter::GetFilename()
|
||||
mFilterIndex = 0;
|
||||
}
|
||||
maskString.RemoveLast();
|
||||
wxString defext = mPlugins[mFormat]->GetExtension(mSubFormat).Lower();
|
||||
|
||||
//Bug 1304: Set a default path if none was given. For Export.
|
||||
#ifdef __WIN32__
|
||||
@ -536,14 +537,20 @@ bool Exporter::GetFilename()
|
||||
mFilename.SetPath(gPrefs->Read(wxT("/Export/Path"), wxT("~/Documents")));
|
||||
#endif
|
||||
mFilename.SetName(mProject->GetName());
|
||||
if (mFilename.GetName().empty())
|
||||
mFilename.SetName(_("untitled"));
|
||||
while (true) {
|
||||
// Must reset each iteration
|
||||
mBook = NULL;
|
||||
|
||||
{
|
||||
auto useFileName = mFilename;
|
||||
if (!useFileName.HasExt())
|
||||
useFileName.SetExt(defext);
|
||||
FileDialog fd(mProject,
|
||||
mFileDialogTitle,
|
||||
mFilename.GetPath(),
|
||||
mFilename.GetFullName(),
|
||||
useFileName.GetFullName(),
|
||||
maskString,
|
||||
wxFD_SAVE | wxRESIZE_BORDER);
|
||||
mDialog = &fd;
|
||||
@ -567,6 +574,7 @@ bool Exporter::GetFilename()
|
||||
|
||||
mFormat = fd.GetFilterIndex();
|
||||
mFilterIndex = fd.GetFilterIndex();
|
||||
}
|
||||
|
||||
int c = 0;
|
||||
int i = -1;
|
||||
@ -585,7 +593,7 @@ bool Exporter::GetFilename()
|
||||
}
|
||||
|
||||
wxString ext = mFilename.GetExt();
|
||||
wxString defext = mPlugins[mFormat]->GetExtension(mSubFormat).Lower();
|
||||
defext = mPlugins[mFormat]->GetExtension(mSubFormat).Lower();
|
||||
|
||||
//
|
||||
// Check the extension - add the default if it's not there,
|
||||
|
Loading…
x
Reference in New Issue
Block a user