1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-14 23:30:23 +02:00

Revert to non-persistent LastOpenType per Gale's request

This commit is contained in:
LRN1986 2010-03-26 15:48:13 +00:00
parent eac019b68a
commit 1527368d99
2 changed files with 12 additions and 7 deletions

View File

@ -4466,6 +4466,7 @@ void AudacityProject::OnImport()
{
wxArrayString selectedFiles = ShowOpenDialog(wxT(""));
if (selectedFiles.GetCount() == 0) {
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
return;
}
@ -4483,7 +4484,8 @@ void AudacityProject::OnImport()
Import(fileName);
}
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
HandleResize(); // Adjust scrollers for new track sizes.
ODManager::Resume();
}

View File

@ -2138,10 +2138,8 @@ wxArrayString AudacityProject::ShowOpenDialog(wxString extraformat, wxString ext
dlog.SetFilterIndex(index);
if (dlog.ShowModal() != wxID_OK) {
return selected;
}
int dialogResult = dlog.ShowModal();
// Convert the filter index to type and save
index = dlog.GetFilterIndex();
for (int i = 0; i < index; i++) {
@ -2150,8 +2148,10 @@ wxArrayString AudacityProject::ShowOpenDialog(wxString extraformat, wxString ext
gPrefs->Write(wxT("/DefaultOpenType"), mask.BeforeFirst(wxT('|')));
gPrefs->Write(wxT("/LastOpenType"), mask.BeforeFirst(wxT('|')));
// Return the selected files
dlog.GetPaths(selected);
if (dialogResult != wxID_OK) {
// Return the selected files
dlog.GetPaths(selected);
}
return selected;
}
@ -2164,6 +2164,7 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
* now be added automatically for the Save Projects dialogues).*/
wxArrayString selectedFiles = ShowOpenDialog(_("Audacity projects"), wxT("*.aup"));
if (selectedFiles.GetCount() == 0) {
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
return;
}
@ -2218,6 +2219,8 @@ void AudacityProject::OpenFiles(AudacityProject *proj)
proj->OpenFile(fileName);
}
gPrefs->Write(wxT("/LastOpenType"),wxT(""));
ODManager::Resume();
}