mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-16 16:47:41 +02:00
Fix bug 1513
The error message is still a bit strange if trying to overwrite a different project when the current project has been saved, (why would you do that?), but probably not worth complicating the message for such a fringe case.
This commit is contained in:
parent
2ec12d2ffd
commit
341e3e1207
@ -301,19 +301,24 @@ void TimerRecordDialog::OnAutoSavePathButton_Click(wxCommandEvent& WXUNUSED(even
|
||||
if (fName == wxT(""))
|
||||
return;
|
||||
|
||||
// MY: If project already exits then abort - we do not allow users to overwrite an existing project
|
||||
if (wxFileExists(fName)) {
|
||||
AudacityProject* pProject = GetActiveProject();
|
||||
|
||||
// If project already exits then abort - we do not allow users to overwrite an existing project
|
||||
// unless it is the current project.
|
||||
if (wxFileExists(fName) && (pProject->GetFileName() != fName)) {
|
||||
wxMessageDialog m(
|
||||
NULL,
|
||||
_("The selected file name could not be used\nfor Timer Recording because it would overwrite another project.\nPlease try again and select an original name."),
|
||||
_("The selected file name could not be used\nfor Timer Recording because it \
|
||||
would overwrite another project.\nPlease try again and select an original name."),
|
||||
_("Error Saving Timer Recording Project"),
|
||||
wxOK|wxICON_ERROR);
|
||||
m.ShowModal();
|
||||
return;
|
||||
}
|
||||
|
||||
// MY: Set this boolean to false so we now do a SaveAs at the end of the recording
|
||||
m_bProjectAlreadySaved = false;
|
||||
// Set this boolean to false so we now do a SaveAs at the end of the recording
|
||||
// unless we're saving the current project.
|
||||
m_bProjectAlreadySaved = pProject->GetFileName() == fName? true : false;
|
||||
|
||||
m_fnAutoSaveFile = fName;
|
||||
m_fnAutoSaveFile.SetExt(wxT("aup"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user