mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Dispatch read of top-level project XML tags with a table of functions...
... which makes Project.cpp a bit less dependent on some details of other classes This puts Tags.cpp back into the big strongly connected component of the dependency graph. That will be remedied later when Project.cpp becomes a low-level file
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "Envelope.h"
|
||||
#include "Prefs.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileIORegistry.h"
|
||||
#include "TrackArtist.h"
|
||||
#include "AllThemeResources.h"
|
||||
|
||||
@@ -39,6 +40,15 @@ std::shared_ptr<TimeTrack> TrackFactory::NewTimeTrack()
|
||||
return std::make_shared<TimeTrack>(mDirManager, mZoomInfo);
|
||||
}
|
||||
|
||||
static ProjectFileIORegistry::Entry registerFactory{
|
||||
wxT( "timetrack" ),
|
||||
[]( AudacityProject &project ){
|
||||
auto &trackFactory = *project.GetTrackFactory();
|
||||
auto &tracks = *project.GetTracks();
|
||||
return tracks.Add(trackFactory.NewTimeTrack());
|
||||
}
|
||||
};
|
||||
|
||||
TimeTrack::TimeTrack(const std::shared_ptr<DirManager> &projDirManager, const ZoomInfo *zoomInfo):
|
||||
Track(projDirManager)
|
||||
, mZoomInfo(zoomInfo)
|
||||
|
||||
Reference in New Issue
Block a user