1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-28 00:55:50 +01:00

Track factory cleanup (#646)

* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
This commit is contained in:
Paul Licameli
2020-08-22 19:44:49 -04:00
committed by GitHub
parent 0f98522b5c
commit 4ca3e7096f
42 changed files with 158 additions and 198 deletions

View File

@@ -112,20 +112,14 @@ SONFNS(AutoSave)
static ProjectFileIORegistry::Entry registerFactory{
wxT( "notetrack" ),
[]( AudacityProject &project ){
auto &trackFactory = TrackFactory::Get( project );
auto &tracks = TrackList::Get( project );
auto result = tracks.Add(trackFactory.NewNoteTrack());
auto result = tracks.Add( std::make_shared<NoteTrack>());
TrackView::Get( *result );
TrackControls::Get( *result );
return result;
}
};
NoteTrack::Holder TrackFactory::NewNoteTrack()
{
return std::make_shared<NoteTrack>();
}
NoteTrack::NoteTrack()
: NoteTrackBase()
{