1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-17 08:17:59 +01:00

MixerBoard listens to TrackList for insert, delete, permute...

... Which is also sufficient to detect undo/redo/rollback

And detects more often than undo state changes, so that if you drag a track
in TrackPanel, the same permutation is seen at once in MixerBoard, even before
button-up
This commit is contained in:
Paul Licameli
2018-02-05 19:04:23 -05:00
parent 7150d43083
commit 5ab2faceea
7 changed files with 47 additions and 112 deletions

View File

@@ -4707,7 +4707,6 @@ void AudacityProject::PopState(const UndoState &state)
HandleResize();
GetMenuManager(*this).UpdateMenus(*this);
this->UpdateMixerBoard();
AutoSave();
}
@@ -4721,7 +4720,6 @@ void AudacityProject::SetStateTo(unsigned int n)
mTrackPanel->SetFocusedTrack(NULL);
mTrackPanel->Refresh(false);
GetMenuManager(*this).ModifyUndoMenuItems(*this);
this->UpdateMixerBoard();
}
void AudacityProject::UpdateMixerBoard()
@@ -5598,15 +5596,6 @@ void AudacityProject::RemoveTrack(Track * toRemove)
wxString name = toRemove->GetName();
auto playable = dynamic_cast<PlayableTrack*>(toRemove);
if (playable)
{
// Update mixer board displayed tracks.
MixerBoard* pMixerBoard = this->GetMixerBoard();
if (pMixerBoard)
pMixerBoard->RemoveTrackCluster(playable); // Will remove partner shown in same cluster.
}
auto channels = TrackList::Channels(toRemove);
// Be careful to post-increment over positions that get erased!
auto &iter = channels.first;