mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +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) {
|
if(proj) {
|
||||||
// Chain failed or was cancelled; revert to the previous state
|
// Chain failed or was cancelled; revert to the previous state
|
||||||
UndoManager *um = proj->GetUndoManager();
|
proj->RollbackState();
|
||||||
proj->SetStateTo(um->GetCurrentState());
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3933,6 +3933,11 @@ void AudacityProject::PushState(wxString desc,
|
|||||||
AutoSave();
|
AutoSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AudacityProject::RollbackState()
|
||||||
|
{
|
||||||
|
SetStateTo(GetUndoManager()->GetCurrentState());
|
||||||
|
}
|
||||||
|
|
||||||
void AudacityProject::ModifyState(bool bWantsAutoSave)
|
void AudacityProject::ModifyState(bool bWantsAutoSave)
|
||||||
{
|
{
|
||||||
mUndoManager.ModifyState(mTracks, mViewInfo.selectedRegion);
|
mUndoManager.ModifyState(mTracks, mViewInfo.selectedRegion);
|
||||||
|
@ -473,6 +473,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
|||||||
|
|
||||||
void PushState(wxString desc, wxString shortDesc,
|
void PushState(wxString desc, wxString shortDesc,
|
||||||
int flags = PUSH_AUTOSAVE);
|
int flags = PUSH_AUTOSAVE);
|
||||||
|
void RollbackState();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user