1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

Fix bug 680

"Project was recovered" replaces "Create new project" in Undo History.
This commit is contained in:
Steve Daulton 2019-07-19 12:27:14 +01:00
parent 93bb862aa2
commit 75fdadf674
2 changed files with 5 additions and 2 deletions

View File

@ -103,13 +103,13 @@ HistoryWindow::HistoryWindow(AudacityProject *parent, UndoManager *manager):
[](wxEvent&){});
S.AddVariableText( {} )->Hide();
mAvail = S.Id(ID_AVAIL).AddTextBox(_("&Undo Levels Available"), wxT("0"), 10);
mAvail = S.Id(ID_AVAIL).AddTextBox(_("&Undo levels available"), wxT("0"), 10);
mAvail->Bind(wxEVT_KEY_DOWN,
// ignore it
[](wxEvent&){});
S.AddVariableText( {} )->Hide();
S.AddPrompt(_("&Levels To Discard"));
S.AddPrompt(_("&Levels to discard"));
mLevels = safenew wxSpinCtrl(S.GetParent(),
ID_LEVELS,
wxT("1"),

View File

@ -898,6 +898,9 @@ AudacityProject *ProjectManager::OpenProject(
if( projectFileIO.IsRecovered() ) {
auto &window = ProjectWindow::Get( *pProject );
window.Zoom( window.GetZoomOfToFit() );
// "Project was recovered" replaces "Create new project" in Undo History.
auto &undoManager = UndoManager::Get( *pProject );
undoManager.RemoveStates(1);
}
return pProject;