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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user