1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-01 20:14:49 +02: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

@@ -29,7 +29,7 @@ Paul Licameli split from ProjectManager.cpp
#include "ProjectSettings.h"
#include "ProjectStatus.h"
#include "TimeTrack.h"
#include "TrackPanel.h"
#include "TrackPanelAx.h"
#include "ViewInfo.h"
#include "WaveTrack.h"
#include "toolbars/ToolManager.h"
@@ -685,7 +685,7 @@ bool ProjectAudioManager::DoRecord(AudacityProject &project,
TrackList::Get( *p ).RegisterPendingNewTrack( newTrack );
transportTracks.captureTracks.push_back(newTrack);
// Bug 1548. New track needs the focus.
TrackPanel::Get( *p ).SetFocusedTrack( newTrack.get() );
TrackFocus::Get( *p ).Set( newTrack.get() );
}
TrackList::Get( *p ).GroupChannels(*first, recordingChannels);
}