Remove more global automation from MidiImport (#6605)

This commit is contained in:
Hyunjin Song
2023-01-17 21:17:38 +09:00
committed by GitHub
parent 679d63224a
commit e8e54a7ba8
4 changed files with 10 additions and 16 deletions

View File

@@ -358,7 +358,11 @@ bool MidiImport::readSMF( TrackContainer* tc )
pd.setValue( 2 );
// Tempo stuff
AutomationClip * tap = tc->tempoAutomationClip();
auto tt = dynamic_cast<AutomationTrack*>(Track::create(Track::AutomationTrack, Engine::getSong()));
tt->setName(tr("Tempo"));
auto tap = new AutomationClip(tt);
tap->setDisplayName(tr("Tempo"));
tap->addObject(&Engine::getSong()->tempoModel());
if( tap )
{
tap->clear();