1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

MIDI imports, like other imports, are put into recent files list

This commit is contained in:
Paul Licameli 2017-08-02 11:18:05 -04:00
parent 1895994bd8
commit 3e39771c53
2 changed files with 7 additions and 1 deletions

View File

@ -6827,6 +6827,9 @@ AudacityProject *AudacityProject::DoImportMIDI(
pProject->ZoomAfterImport(pTrack);
pNewProject = nullptr;
wxGetApp().AddFileToHistory(fileName);
return pProject;
}
else

View File

@ -3075,7 +3075,10 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
// FIXME: //v Surely we could be smarter about this, like checking much earlier that this is a .aup file.
if (temp.Mid(0, 6) != wxT("<?xml ")) {
// If it's not XML, try opening it as any other form of audio
Import(fileName);
if (Importer::IsMidi(fileName))
DoImportMIDI(this, fileName);
else
Import(fileName);
return;
}