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

@@ -38,6 +38,7 @@ Paul Licameli split from AudacityProject.cpp
#include "SelectionState.h"
#include "Sequence.h"
#include "Tags.h"
#include "TrackPanelAx.h"
#include "TrackPanel.h"
#include "UndoManager.h"
#include "WaveClip.h"
@@ -1347,7 +1348,7 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory
SelectionBar::Get( project ).SetRate( settings.GetRate() );
ProjectHistory::Get( project ).InitialState();
trackPanel.SetFocusedTrack( *tracks.Any().begin() );
TrackFocus::Get( project ).Set( *tracks.Any().begin() );
window.HandleResize();
trackPanel.Refresh(false);
trackPanel.Update(); // force any repaint to happen now,