1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 15:23:52 +02:00

Fix for bug #887

A little overkill, but low risk since the majority of the source
changed isn't actually used.
This commit is contained in:
Leland Lucius
2015-05-16 17:57:01 -05:00
parent f98d9ce712
commit cbcc78b183
14 changed files with 85 additions and 72 deletions

View File

@@ -41,16 +41,16 @@ bool OpenProjectCommand::Apply(CommandExecutionContext context)
{
wxString fileName = GetString(wxT("Filename"));
bool addToHistory = GetBool(wxT("AddToHistory"));
wxString oldFileName = context.proj->GetFileName();
wxString oldFileName = context.GetProject()->GetFileName();
if(fileName == wxEmptyString)
{
context.proj->OnOpen();
context.GetProject()->OnOpen();
}
else
{
context.proj->OpenFile(fileName,addToHistory);
context.GetProject()->OpenFile(fileName,addToHistory);
}
wxString newFileName = context.proj->GetFileName();
wxString newFileName = context.GetProject()->GetFileName();
// Because Open does not return a success or failure, we have to guess
// at this point, based on whether the project file name has
@@ -91,9 +91,9 @@ bool SaveProjectCommand::Apply(CommandExecutionContext context)
bool saveCompressed = GetBool(wxT("Compress"));
bool addToHistory = GetBool(wxT("AddToHistory"));
if(fileName == wxEmptyString)
return context.proj->SaveAs(saveCompressed);
return context.GetProject()->SaveAs(saveCompressed);
else
return context.proj->SaveAs(fileName,saveCompressed,addToHistory);
return context.GetProject()->SaveAs(fileName,saveCompressed,addToHistory);
}
SaveProjectCommand::~SaveProjectCommand()