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