1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

Minimized state moved into TrackView

This commit is contained in:
Paul Licameli
2019-06-18 11:29:38 -04:00
parent 7a91cc8e8d
commit 3797a5227a
14 changed files with 108 additions and 83 deletions

View File

@@ -18,6 +18,7 @@
#include "../commands/CommandManager.h"
#include "../prefs/GUIPrefs.h"
#include "../prefs/TracksPrefs.h"
#include "../tracks/ui/TrackView.h"
#ifdef EXPERIMENTAL_EFFECTS_RACK
#include "../effects/EffectManager.h"
@@ -189,7 +190,9 @@ void DoZoomFitV(AudacityProject &project)
auto &tracks = TrackList::Get( project );
// Only nonminimized audio tracks will be resized
auto range = tracks.Any<AudioTrack>() - &Track::GetMinimized;
auto range = tracks.Any<AudioTrack>()
- [](const Track *pTrack){
return TrackView::Get( *pTrack ).GetMinimized(); };
auto count = range.size();
if (count == 0)
return;
@@ -315,7 +318,7 @@ void OnCollapseAllTracks(const CommandContext &context)
auto &window = ProjectWindow::Get( project );
for (auto t : tracks.Any())
t->SetMinimized(true);
TrackView::Get( *t ).SetMinimized(true);
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();
@@ -328,7 +331,7 @@ void OnExpandAllTracks(const CommandContext &context)
auto &window = ProjectWindow::Get( project );
for (auto t : tracks.Any())
t->SetMinimized(false);
TrackView::Get( *t ).SetMinimized(false);
ProjectHistory::Get( project ).ModifyState(true);
window.RedrawProject();