1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-22 00:47:13 +01:00

static SelectionState::Get()...

... not member functions of AudacityProject
This commit is contained in:
Paul Licameli
2019-01-22 12:06:46 -05:00
parent c1c0030013
commit 68e25f3b7d
10 changed files with 39 additions and 15 deletions

View File

@@ -4,6 +4,7 @@
#include "../Prefs.h"
#include "../Project.h"
#include "../Track.h"
#include "../SelectionState.h"
#include "../TrackPanel.h"
#include "../TrackPanelAx.h"
#include "../commands/CommandContext.h"
@@ -85,7 +86,7 @@ void DoPrevTrack(
{
auto trackPanel = project.GetTrackPanel();
auto &tracks = TrackList::Get( project );
auto &selectionState = project.GetSelectionState();
auto &selectionState = SelectionState::Get( project );
Track* t = trackPanel->GetFocusedTrack();
if( t == NULL ) // if there isn't one, focus on last
@@ -195,7 +196,7 @@ void DoNextTrack(
{
auto trackPanel = project.GetTrackPanel();
auto &tracks = TrackList::Get( project );
auto &selectionState = project.GetSelectionState();
auto &selectionState = SelectionState::Get( project );
auto t = trackPanel->GetFocusedTrack(); // Get currently focused track
if( t == NULL ) // if there isn't one, focus on first
@@ -507,7 +508,7 @@ void OnToggle(const CommandContext &context)
{
auto &project = context.project;
auto trackPanel = project.GetTrackPanel();
auto &selectionState = project.GetSelectionState();
auto &selectionState = SelectionState::Get( project );
Track *t;