1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-29 01:25:53 +01:00

New argument for ProjectManager::OpenProject, not yet implemented...

... It is false in exactly the cases where there is now also a check first for
the safety of opening a project file.

Those are the cases where a new project was made for imports, but this was not
necessary for safety.  Yet old behavior will be preserved in such cases.
This commit is contained in:
Paul Licameli
2021-05-19 13:14:28 -04:00
parent 97cf411dd5
commit a1650771b1
5 changed files with 19 additions and 9 deletions

View File

@@ -873,7 +873,8 @@ void ProjectManager::OpenFiles(AudacityProject *proj)
if (proj && !SafeToOpenProjectInto(*proj))
proj = nullptr;
proj = OpenProject( proj, fileName );
proj = OpenProject( proj, fileName,
true /* addtohistory */, false /* reuseNonemptyProject */ );
}
}
@@ -901,7 +902,8 @@ bool ProjectManager::SafeToOpenProjectInto(AudacityProject &proj)
}
AudacityProject *ProjectManager::OpenProject(
AudacityProject *pProject, const FilePath &fileNameArg, bool addtohistory)
AudacityProject *pProject, const FilePath &fileNameArg,
bool addtohistory, bool)
{
bool success = false;
AudacityProject *pNewProject = nullptr;