mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-29 16:08:46 +01: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:
@@ -3977,6 +3977,8 @@ bool AudacityProject::DoSave (const bool fromSaveAs,
|
|||||||
if (!success)
|
if (!success)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
{
|
||||||
|
std::vector<std::unique_ptr<WaveTrack::Locker>> lockers;
|
||||||
Maybe<DirManager::ProjectSetter> pSetter;
|
Maybe<DirManager::ProjectSetter> pSetter;
|
||||||
|
|
||||||
if (fromSaveAs && !bWantSaveCopy) {
|
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
|
// (Otherwise the NEW project would be fine, but the old one would
|
||||||
// be empty of all of its files.)
|
// be empty of all of its files.)
|
||||||
|
|
||||||
std::vector<std::unique_ptr<WaveTrack::Locker>> lockers;
|
|
||||||
if (mLastSavedTracks) {
|
if (mLastSavedTracks) {
|
||||||
lockers.reserve(mLastSavedTracks->size());
|
lockers.reserve(mLastSavedTracks->size());
|
||||||
for (auto wt : mLastSavedTracks->Any<WaveTrack>())
|
for (auto wt : mLastSavedTracks->Any<WaveTrack>())
|
||||||
@@ -4022,6 +4023,7 @@ bool AudacityProject::DoSave (const bool fromSaveAs,
|
|||||||
|
|
||||||
if (pSetter)
|
if (pSetter)
|
||||||
pSetter->Commit();
|
pSetter->Commit();
|
||||||
|
}
|
||||||
|
|
||||||
if ( !bWantSaveCopy )
|
if ( !bWantSaveCopy )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user