MCPcopy Create free account
hub / github.com/audacity/audacity / SetTrack

Method SetTrack

src/RealtimeEffectPanel.cpp:1378–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378void RealtimeEffectPanel::SetTrack(const std::shared_ptr<SampleTrack>& track)
1379{
1380 //Avoid creation-on-demand of a useless, empty list in case the track is of non-wave type.
1381 if(track && dynamic_cast<WaveTrack*>(&*track) != nullptr)
1382 {
1383 mTrackTitle->SetLabel(track->GetName());
1384 mToggleTrackEffects->Enable();
1385 track && RealtimeEffectList::Get(*track).IsActive()
1386 ? mToggleTrackEffects->PushDown()
1387 : mToggleTrackEffects->PopUp();
1388 mTrackEffectList->SetDelegate(
1389 mProject,
1390 std::make_shared<TrackEffectListUIDelegate>(track)
1391 );
1392
1393 mCurrentTrack = track;
1394 //i18n-hint: argument - track name
1395 mTrackEffectsHeader->SetName(wxString::Format(_("Realtime effects for %s"), track->GetName()));
1396 }
1397 else
1398 ResetTrack();
1399}
1400
1401void RealtimeEffectPanel::ResetTrack()
1402{

Callers

nothing calls this directly

Calls 9

GetFunction · 0.85
SetLabelMethod · 0.45
GetNameMethod · 0.45
EnableMethod · 0.45
IsActiveMethod · 0.45
PushDownMethod · 0.45
PopUpMethod · 0.45
SetDelegateMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected