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

Toolbars accessed by static Get() functions, not through AudacityProject

This commit is contained in:
Paul Licameli
2019-05-24 15:48:36 -04:00
parent 7bb71257ed
commit 3416b5bad6
35 changed files with 333 additions and 303 deletions

View File

@@ -463,7 +463,8 @@ void TrackPanel::OnTimer(wxTimerEvent& )
{
//the stream may have been started up after this one finished (by some other project)
//in that case reset the buttons don't stop the stream
p->GetControlToolBar()->StopPlaying(!gAudioIO->IsStreamActive());
auto &bar = ControlToolBar::Get( *p );
bar.StopPlaying(!gAudioIO->IsStreamActive());
}
// Next, check to see if we were playing or recording
@@ -1130,7 +1131,7 @@ void TrackPanel::DrawTracks(wxDC * dc)
// Don't draw a bottom margin here.
ToolsToolBar *pTtb = GetProject()->GetToolsToolBar();
auto pTtb = &ToolsToolBar::Get( *GetProject() );
bool bMultiToolDown = pTtb->IsDown(multiTool);
bool envelopeFlag = pTtb->IsDown(envelopeTool) || bMultiToolDown;
bool bigPointsFlag = pTtb->IsDown(drawTool) || bMultiToolDown;