mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
static TrackList::Get()...
... not member function of AudacityProject
This commit is contained in:
@@ -103,7 +103,7 @@ static ProjectFileIORegistry::Entry registerFactory{
|
||||
wxT( "labeltrack" ),
|
||||
[]( AudacityProject &project ){
|
||||
auto &trackFactory = *project.GetTrackFactory();
|
||||
auto &tracks = *project.GetTracks();
|
||||
auto &tracks = TrackList::Get( project );
|
||||
return tracks.Add(trackFactory.NewLabelTrack());
|
||||
}
|
||||
};
|
||||
@@ -1988,7 +1988,7 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
|
||||
|
||||
case WXK_ESCAPE:
|
||||
if (mRestoreFocus >= 0) {
|
||||
auto track = *GetActiveProject()->GetTracks()->Any()
|
||||
auto track = *TrackList::Get( *GetActiveProject() ).Any()
|
||||
.begin().advance(mRestoreFocus);
|
||||
if (track)
|
||||
GetActiveProject()->GetTrackPanel()->SetFocusedTrack(track);
|
||||
@@ -3084,12 +3084,12 @@ void LabelTrack::DoEditLabels
|
||||
{
|
||||
auto format = project.GetSelectionFormat(),
|
||||
freqFormat = project.GetFrequencySelectionFormatName();
|
||||
auto tracks = project.GetTracks();
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto trackFactory = project.GetTrackFactory();
|
||||
auto rate = project.GetRate();
|
||||
auto &viewInfo = project.GetViewInfo();
|
||||
|
||||
LabelDialog dlg(&project, *trackFactory, tracks,
|
||||
LabelDialog dlg(&project, *trackFactory, &tracks,
|
||||
lt, index,
|
||||
viewInfo, rate,
|
||||
format, freqFormat);
|
||||
|
||||
Reference in New Issue
Block a user