1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +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

@@ -18,6 +18,7 @@
#include "ProjectHistory.h"
#include "ProjectSettings.h"
#include "SelectionState.h"
#include "TrackPanelAx.h"
#include "TrackPanel.h"
#include "ViewInfo.h"
#include "WaveTrack.h"
@@ -93,7 +94,6 @@ void DoListSelection
(AudacityProject &project, Track *t, bool shift, bool ctrl, bool modifyState)
{
auto &tracks = TrackList::Get( project );
auto &trackPanel = TrackPanel::Get( project );
auto &selectionState = SelectionState::Get( project );
const auto &settings = ProjectSettings::Get( project );
auto &viewInfo = ViewInfo::Get( project );
@@ -106,7 +106,7 @@ void DoListSelection
shift, ctrl, isSyncLocked );
if (! ctrl )
trackPanel.SetFocusedTrack(t);
TrackFocus::Get( project ).Set( t );
window.Refresh(false);
if (modifyState)
ProjectHistory::Get( project ).ModifyState(true);