From 1fc4c5724e5de2da22ccabd366a7fd220aec4b57 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 11 Feb 2018 17:16:29 -0500 Subject: [PATCH] MixerBoard no longer needs update at undo push... ... it does that sooner, and ony when needed, when relevant track data really change, by listening to the TrackList. --- src/Project.cpp | 21 --------------------- src/Project.h | 2 -- 2 files changed, 23 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index c555e38b7..d81c7ba32 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -4592,7 +4592,6 @@ void AudacityProject::InitialState() GetMenuManager(*this).ModifyUndoMenuItems(*this); GetMenuManager(*this).UpdateMenus(*this); - this->UpdateMixerBoard(); } bool AudacityProject::UndoAvailable() @@ -4627,14 +4626,6 @@ void AudacityProject::PushState(const wxString &desc, GetMenuManager(*this).UpdateMenus(*this); - // Some state pushes, like changing a track gain control (& probably others), - // should not repopulate MixerBoard. - // Others, such as deleting adding a wave track, obviously do. - // Could categorize these state changes, but for now... - // It's crucial to not do that repopulating during playback. - if (!gAudioIO->IsStreamActive(GetAudioIOToken())) - this->UpdateMixerBoard(); - if (GetTracksFitVerticallyZoomed()) ViewActions::DoZoomFitV(*this); if((flags & UndoPush::AUTOSAVE) != UndoPush::MINIMAL) @@ -4722,18 +4713,6 @@ void AudacityProject::SetStateTo(unsigned int n) GetMenuManager(*this).ModifyUndoMenuItems(*this); } -void AudacityProject::UpdateMixerBoard() -{ - if (!mMixerBoard) - return; - mMixerBoard->UpdateTrackClusters(); - - // Vaughan, 2011-01-28: AudacityProject::UpdateMixerBoard() is called on state changes, - // so don't really need to call UpdateMeters(). - //mMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(), (mLastPlayMode == loopedPlay)); -} - - void AudacityProject::RecreateMixerBoard( ) { wxASSERT( mMixerBoard ); diff --git a/src/Project.h b/src/Project.h index 9df43812c..e7e2b12e9 100644 --- a/src/Project.h +++ b/src/Project.h @@ -605,8 +605,6 @@ public: void PopState(const UndoState &state); - void UpdateMixerBoard(); - void GetRegionsByLabel( Regions ®ions ); void AutoSave();