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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user