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

Bug2493, Enh2460: Multi-view option in Tracks preferences & macros...

... Implemented giving the Multi-view choice the special implementation that it
needs.

The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.

Multi-view should not be treated as another registered kind of sub-view on par
with others.  This would complicate the implementation in worse ways.
This commit is contained in:
Paul Licameli
2020-09-10 14:59:17 -04:00
parent 42d99db8b8
commit c7896a3656
5 changed files with 49 additions and 7 deletions

View File

@@ -1273,6 +1273,11 @@ void WaveTrackView::BuildSubViews() const
auto pTrack = pThis->FindTrack();
auto display = TracksPrefs::ViewModeChoice();
bool multi = (display == WaveTrackViewConstants::MultiView);
if ( multi ) {
pThis->SetMultiView( true );
display = WaveTrackSubViewType::Default();
}
// Force creation always:
WaveformSettings &settings = static_cast< WaveTrack* >( pTrack.get() )
@@ -1282,7 +1287,7 @@ void WaveTrackView::BuildSubViews() const
// spectrogram
settings.scaleType = TracksPrefs::WaveformScaleChoice();
pThis->DoSetDisplay( display );
pThis->DoSetDisplay( display, !multi );
}
}
}