mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Separate default waveform scale choice in Tracks preferences...
... Some complications in handling correct migration of preferences from config files in older versions
This commit is contained in:
@@ -1206,13 +1206,12 @@ void WaveTrackView::BuildSubViews() const
|
||||
|
||||
// Force creation always:
|
||||
WaveformSettings &settings = static_cast< WaveTrack* >( pTrack.get() )
|
||||
->GetIndependentWaveformSettings();
|
||||
|
||||
if (display == WaveTrackViewConstants::obsoleteWaveformDBDisplay) {
|
||||
display = WaveTrackViewConstants::Waveform;
|
||||
settings.scaleType = WaveformSettings::stLogarithmic;
|
||||
}
|
||||
|
||||
->GetIndependentWaveformSettings();
|
||||
|
||||
// Set the default scale type to linear or log, even if we are showing
|
||||
// spectrogram
|
||||
settings.scaleType = TracksPrefs::WaveformScaleChoice();
|
||||
|
||||
pThis->DoSetDisplay( display );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,27 +43,3 @@ WaveTrackViewConstants::ConvertLegacyDisplayValue(int oldValue)
|
||||
}
|
||||
return newValue;
|
||||
}
|
||||
|
||||
// static
|
||||
WaveTrackViewConstants::Display
|
||||
WaveTrackViewConstants::ValidateWaveTrackDisplay(Display display)
|
||||
{
|
||||
switch (display) {
|
||||
// non-obsolete codes
|
||||
case Waveform:
|
||||
case obsoleteWaveformDBDisplay:
|
||||
case Spectrum:
|
||||
return display;
|
||||
|
||||
// obsolete codes
|
||||
case obsolete1: // was SpectrumLogDisplay
|
||||
case obsolete2: // was SpectralSelectionDisplay
|
||||
case obsolete3: // was SpectralSelectionLogDisplay
|
||||
case obsolete4: // was PitchDisplay
|
||||
return Spectrum;
|
||||
|
||||
// codes out of bounds (from future prefs files?)
|
||||
default:
|
||||
return MinDisplay;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,6 @@ namespace WaveTrackViewConstants
|
||||
|
||||
// Handle remapping of enum values from 2.1.0 and earlier
|
||||
Display ConvertLegacyDisplayValue(int oldValue);
|
||||
|
||||
// Handle restriction of range of values of the enum from future versions
|
||||
Display ValidateWaveTrackDisplay(Display display);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user