mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-25 17:08:07 +02:00
Fix for bug #334
This commit is contained in:
parent
f83a79f198
commit
0e12ab6760
@ -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 AudacityProject::Save(bool overwrite /* = true */ ,
|
||||||
bool fromSaveAs /* = false */,
|
bool fromSaveAs /* = false */,
|
||||||
bool bWantSaveCompressed /*= false*/)
|
bool bWantSaveCompressed /*= false*/)
|
||||||
{
|
{
|
||||||
|
ProjectDisabler disabler(this);
|
||||||
|
|
||||||
if (bWantSaveCompressed)
|
if (bWantSaveCompressed)
|
||||||
wxASSERT(fromSaveAs);
|
wxASSERT(fromSaveAs);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user