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