AUP3: Automatically save a permanent project

If it was recovered.
This commit is contained in:
Leland Lucius 2020-07-20 13:37:36 -05:00
parent d48ec11578
commit 5652b9b039
2 changed files with 7 additions and 3 deletions

View File

@ -1179,7 +1179,7 @@ bool ProjectFileIO::ShouldVacuum(const std::shared_ptr<TrackList> &tracks)
// Let's make a percentage...should be plenty of head room
current *= 100;
wxLogDebug(wxT("used = %lld total = %lld %lld\n"), current, total, total ? current / total : 0);
wxLogDebug(wxT("used = %lld total = %lld %lld"), current, total, total ? current / total : 0);
if (!total || current / total > 80)
{
wxLogDebug(wxT("not vacuuming"));

View File

@ -144,9 +144,13 @@ auto ProjectFileManager::ReadProjectFile( const FilePath &fileName )
{
if (projectFileIO.IsRecovered())
{
bool resaved = projectFileIO.SaveProject(fileName);
AudacityMessageBox(
XO("This project was not saved properly the last time Audacity ran.\n\n"
"It has been recovered to the last snapshot."),
resaved
? XO("This project was not saved properly the last time Audacity ran.\n\n"
"It has been recovered to the last snapshot and resaved.")
: XO("This project was not saved properly the last time Audacity ran.\n\n"
"It has been recovered to the last snapshot."),
XO("Project Recovered"),
wxICON_WARNING,
&window);