mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 09:01:12 +01:00
RAII for locking the all-projects mutex
This commit is contained in:
@@ -339,7 +339,6 @@ class AUDACITY_DLL_API AudacityProject final : public wxFrame,
|
||||
// Other commands
|
||||
static TrackList *GetClipboardTracks();
|
||||
static void DeleteClipboard();
|
||||
static void DeleteAllProjectsDeleteLock();
|
||||
|
||||
// checkActive is a temporary hack that should be removed as soon as we
|
||||
// get multiple effect preview working
|
||||
@@ -514,10 +513,6 @@ public:
|
||||
bool TryToMakeActionAllowed
|
||||
( CommandFlag & flags, CommandFlag flagsRqd, CommandFlag mask );
|
||||
|
||||
///Prevents DELETE from external thread - for e.g. use of GetActiveProject
|
||||
static void AllProjectsDeleteLock();
|
||||
static void AllProjectsDeleteUnlock();
|
||||
|
||||
void PushState(const wxString &desc, const wxString &shortDesc); // use UndoPush::AUTOSAVE
|
||||
void PushState(const wxString &desc, const wxString &shortDesc, UndoPush flags);
|
||||
void RollbackState();
|
||||
@@ -577,9 +572,12 @@ public:
|
||||
static double msClipT0;
|
||||
static double msClipT1;
|
||||
|
||||
public:
|
||||
///Prevents DELETE from external thread - for e.g. use of GetActiveProject
|
||||
//shared by all projects
|
||||
static ODLock *msAllProjectDeleteMutex;
|
||||
static ODLock &AllProjectDeleteMutex();
|
||||
|
||||
private:
|
||||
// History/Undo manager
|
||||
std::unique_ptr<UndoManager> mUndoManager;
|
||||
bool mDirty{ false };
|
||||
|
||||
Reference in New Issue
Block a user