mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 17:10:55 +02:00
"/DefaultOpenPath" is now in only one place
This commit is contained in:
parent
e3efc98a55
commit
a5594537bb
@ -774,9 +774,7 @@ bool AudacityApp::MRUOpen(const wxString &fullPathStr) {
|
||||
// verify that the file exists
|
||||
if (wxFile::Exists(fullPathStr))
|
||||
{
|
||||
if (!gPrefs->Write(wxT("/DefaultOpenPath"), wxPathOnly(fullPathStr)) ||
|
||||
!gPrefs->Flush())
|
||||
return false;
|
||||
FileNames::UpdateDefaultPath(FileNames::Operation::Open, fullPathStr);
|
||||
|
||||
// Make sure it isn't already open.
|
||||
// Test here even though AudacityProject::OpenFile() also now checks, because
|
||||
|
@ -6731,8 +6731,7 @@ void AudacityProject::OnImport()
|
||||
for (size_t ff = 0; ff < selectedFiles.GetCount(); ff++) {
|
||||
wxString fileName = selectedFiles[ff];
|
||||
|
||||
wxString path = ::wxPathOnly(fileName);
|
||||
gPrefs->Write(wxT("/DefaultOpenPath"), path);
|
||||
FileNames::UpdateDefaultPath(FileNames::Operation::Open, fileName);
|
||||
|
||||
Import(fileName);
|
||||
}
|
||||
|
@ -2927,8 +2927,7 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
|
||||
if (AudacityProject::IsAlreadyOpen(fileName))
|
||||
continue; // Skip ones that are already open.
|
||||
|
||||
gPrefs->Write(wxT("/DefaultOpenPath"), wxPathOnly(fileName));
|
||||
gPrefs->Flush();
|
||||
FileNames::UpdateDefaultPath(FileNames::Operation::Open, fileName);
|
||||
|
||||
// DMM: If the project is dirty, that means it's been touched at
|
||||
// all, and it's not safe to open a NEW project directly in its
|
||||
|
Loading…
x
Reference in New Issue
Block a user