1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-24 08:28:04 +02:00

Fix for bug #334

This commit is contained in:
Leland Lucius 2015-05-29 23:01:58 -05:00
parent f83a79f198
commit 0e12ab6760

View File

@ -3293,10 +3293,28 @@ void AudacityProject::UnlockAllBlocks()
}
}
class ProjectDisabler
{
public:
ProjectDisabler(wxWindow *w)
: mWindow(w)
{
mWindow->GetEventHandler()->SetEvtHandlerEnabled(false);
}
~ProjectDisabler()
{
mWindow->GetEventHandler()->SetEvtHandlerEnabled(true);
}
private:
wxWindow *mWindow;
};
bool AudacityProject::Save(bool overwrite /* = true */ ,
bool fromSaveAs /* = false */,
bool bWantSaveCompressed /*= false*/)
{
ProjectDisabler disabler(this);
if (bWantSaveCompressed)
wxASSERT(fromSaveAs);
else