mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
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
This commit is contained in:
parent
b3dafcedd1
commit
0941eaa0d5
@ -3977,6 +3977,8 @@ bool AudacityProject::DoSave (const bool fromSaveAs,
|
||||
if (!success)
|
||||
return false;
|
||||
|
||||
{
|
||||
std::vector<std::unique_ptr<WaveTrack::Locker>> lockers;
|
||||
Maybe<DirManager::ProjectSetter> 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<std::unique_ptr<WaveTrack::Locker>> lockers;
|
||||
if (mLastSavedTracks) {
|
||||
lockers.reserve(mLastSavedTracks->size());
|
||||
for (auto wt : mLastSavedTracks->Any<WaveTrack>())
|
||||
@ -4022,6 +4023,7 @@ bool AudacityProject::DoSave (const bool fromSaveAs,
|
||||
|
||||
if (pSetter)
|
||||
pSetter->Commit();
|
||||
}
|
||||
|
||||
if ( !bWantSaveCopy )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user