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

Reimplement WaveTrackView::SetDisplay, eliminating mDisplay...

... and much generality for the future in reporting the sub-view division to
TrackPanel.

SetDisplay will have the effect of making one of possibly multiple views take
up all the height.  Where we need to save and restore or otherwise copy the
sub-views, there is more information now than just one enum value.
This commit is contained in:
Paul Licameli
2019-07-09 16:41:41 -04:00
parent 6ccca16a75
commit 2f544bda7a
5 changed files with 85 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ SpectrumPrefs::SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt)
wt->GetSpectrumBounds(&mOrigMin, &mOrigMax);
mTempSettings.maxFreq = mOrigMax;
mTempSettings.minFreq = mOrigMin;
mOrigDisplay = WaveTrackView::Get( *mWt ).GetDisplay();
mOrigPlacements = WaveTrackView::Get( *mWt ).SavePlacements();
}
else {
mTempSettings = mOrigSettings = SpectrogramSettings::defaults();
@@ -424,7 +424,7 @@ void SpectrumPrefs::Rollback()
if (mWt && isOpenPage) {
auto channels = TrackList::Channels(mWt);
for (auto channel : channels)
WaveTrackView::Get( *channel ).SetDisplay( mOrigDisplay );
WaveTrackView::Get( *channel ).RestorePlacements( mOrigPlacements );
}
if (isOpenPage) {