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

Rewrite many iterations over tracks and channels in various places

This commit is contained in:
Paul Licameli
2018-09-18 12:03:37 -04:00
parent fee0f284fe
commit 968d63d5fd
14 changed files with 137 additions and 267 deletions

View File

@@ -43,8 +43,7 @@ It forwards the actual work of doing the commands to the ScreenshotCommand.
#include "Prefs.h"
#include "toolbars/ToolManager.h"
#include "Track.h"
#include "WaveTrack.h"
class OldStyleCommandType;
@@ -720,12 +719,9 @@ void ScreenFrame::SizeTracks(int h)
void ScreenFrame::OnShortTracks(wxCommandEvent & WXUNUSED(event))
{
TrackListIterator iter(mContext.GetProject()->GetTracks());
for (Track * t = iter.First(); t; t = iter.Next()) {
if (t->GetKind() == Track::Wave) {
t->SetHeight(t->GetMinimizedHeight());
}
}
for (auto t : mContext.GetProject()->GetTracks()->Any<WaveTrack>())
t->SetHeight(t->GetMinimizedHeight());
mContext.GetProject()->RedrawProject();
}