mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Define AudacityProject::RollbackState() for reuse elsewhere
This commit is contained in:
parent
d8ce9f0d7d
commit
f35d519c21
@ -683,8 +683,7 @@ bool BatchCommands::ApplyChain(const wxString & filename)
|
||||
{
|
||||
if(proj) {
|
||||
// Chain failed or was cancelled; revert to the previous state
|
||||
UndoManager *um = proj->GetUndoManager();
|
||||
proj->SetStateTo(um->GetCurrentState());
|
||||
proj->RollbackState();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -3933,6 +3933,11 @@ void AudacityProject::PushState(wxString desc,
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
void AudacityProject::RollbackState()
|
||||
{
|
||||
SetStateTo(GetUndoManager()->GetCurrentState());
|
||||
}
|
||||
|
||||
void AudacityProject::ModifyState(bool bWantsAutoSave)
|
||||
{
|
||||
mUndoManager.ModifyState(mTracks, mViewInfo.selectedRegion);
|
||||
|
@ -473,6 +473,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
||||
|
||||
void PushState(wxString desc, wxString shortDesc,
|
||||
int flags = PUSH_AUTOSAVE);
|
||||
void RollbackState();
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user