1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

static TrackPanel::Get()...

... not member functions of AudacityProject
This commit is contained in:
Paul Licameli
2019-04-21 17:01:31 -04:00
parent 00117897bc
commit d1ad8f55e0
39 changed files with 506 additions and 453 deletions

View File

@@ -18,7 +18,7 @@ void SetTool(AudacityProject &project, int tool)
ToolsToolBar *toolbar = project.GetToolsToolBar();
if (toolbar) {
toolbar->SetCurrentTool(tool);
project.GetTrackPanel()->Refresh(false);
TrackPanel::Get( project ).Refresh(false);
}
}
@@ -207,13 +207,13 @@ void OnPrevTool(const CommandContext &context)
{
auto &project = context.project;
auto toolbar = project.GetToolsToolBar();
auto trackPanel = project.GetTrackPanel();
auto &trackPanel = TrackPanel::Get( project );
if (toolbar) {
// Use GetDownTool() here since GetCurrentTool() can return a value that
// doesn't represent the real tool if the Multi-tool is being used.
toolbar->SetCurrentTool((toolbar->GetDownTool()+(numTools-1))%numTools);
trackPanel->Refresh(false);
trackPanel.Refresh(false);
}
}
@@ -221,13 +221,13 @@ void OnNextTool(const CommandContext &context)
{
auto &project = context.project;
auto toolbar = project.GetToolsToolBar();
auto trackPanel = project.GetTrackPanel();
auto &trackPanel = TrackPanel::Get( project );
if (toolbar) {
// Use GetDownTool() here since GetCurrentTool() can return a value that
// doesn't represent the real tool if the Multi-tool is being used.
toolbar->SetCurrentTool((toolbar->GetDownTool()+1)%numTools);
trackPanel->Refresh(false);
trackPanel.Refresh(false);
}
}