From 0941eaa0d5e13f924e5f80a9cf64033ccd6b6004 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 26 Jan 2019 14:18:01 -0500 Subject: [PATCH] Bug2058: shouldn't lose data in original project when saving-as... ... Bug was introduced at commit e87e15f, which was part of an unsuccessful attempt to fix performance Bug1979 --- src/Project.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Project.cpp b/src/Project.cpp index c084ba376..7a5fbbc2f 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -3977,6 +3977,8 @@ bool AudacityProject::DoSave (const bool fromSaveAs, if (!success) return false; + { + std::vector> lockers; Maybe pSetter; if (fromSaveAs && !bWantSaveCopy) { @@ -3987,7 +3989,6 @@ bool AudacityProject::DoSave (const bool fromSaveAs, // (Otherwise the NEW project would be fine, but the old one would // be empty of all of its files.) - std::vector> lockers; if (mLastSavedTracks) { lockers.reserve(mLastSavedTracks->size()); for (auto wt : mLastSavedTracks->Any()) @@ -4022,6 +4023,7 @@ bool AudacityProject::DoSave (const bool fromSaveAs, if (pSetter) pSetter->Commit(); + } if ( !bWantSaveCopy ) {