1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 00:58:37 +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); pProject->ZoomAfterImport(pTrack);
pNewProject = nullptr; pNewProject = nullptr;
wxGetApp().AddFileToHistory(fileName);
return pProject; return pProject;
} }
else else

View File

@ -3075,6 +3075,9 @@ 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. // 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 (temp.Mid(0, 6) != wxT("<?xml ")) {
// If it's not XML, try opening it as any other form of audio // If it's not XML, try opening it as any other form of audio
if (Importer::IsMidi(fileName))
DoImportMIDI(this, fileName);
else
Import(fileName); Import(fileName);
return; return;
} }