1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-05 19:21:59 +01:00

TrackFocus is a new attached object...

... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
This commit is contained in:
Paul Licameli
2019-07-01 18:32:18 -04:00
parent 02075d5b43
commit acfd2b7010
21 changed files with 240 additions and 157 deletions

View File

@@ -28,6 +28,7 @@ This class now lists
#include "CommandTargets.h"
#include "../effects/EffectManager.h"
#include "../widgets/Overlay.h"
#include "../TrackPanelAx.h"
#include "../TrackPanel.h"
#include "../WaveClip.h"
#include "../ViewInfo.h"
@@ -489,8 +490,8 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
context.StartArray();
for (auto trk : tracks.Leaders())
{
auto &panel = TrackPanel::Get( context.project );
Track * fTrack = panel.GetFocusedTrack();
auto &trackFocus = TrackFocus::Get( context.project );
Track * fTrack = trackFocus.Get();
context.StartStruct();
context.AddItem( trk->GetName(), "name" );