Mercurial > hg > svcore
diff base/Preferences.cpp @ 245:4cd620bd4c61 sv1-1.0pre1
* Make getPropertyRangeAndValue return the default separately from the current
value. Previously some contexts were incorrectly treating the current value
as a default.
author | Chris Cannam |
---|---|
date | Fri, 02 Mar 2007 14:00:12 +0000 |
parents | 91fdc752e540 |
children | d7eeffbb8aaf |
line wrap: on
line diff
--- a/base/Preferences.cpp Fri Mar 02 13:01:41 2007 +0000 +++ b/base/Preferences.cpp Fri Mar 02 14:00:12 2007 +0000 @@ -113,11 +113,12 @@ int Preferences::getPropertyRangeAndValue(const PropertyName &name, - int *min, int *max) const + int *min, int *max, int *deflt) const { if (name == "Smooth Spectrogram") { if (min) *min = 0; if (max) *max = 1; + if (deflt) *deflt = 1; return m_smoothSpectrogram ? 1 : 0; } @@ -126,18 +127,21 @@ if (name == "Property Box Layout") { if (min) *min = 0; if (max) *max = 1; + if (deflt) *deflt = 0; return m_propertyBoxLayout == Layered ? 1 : 0; } if (name == "Window Type") { if (min) *min = int(RectangularWindow); if (max) *max = int(BlackmanHarrisWindow); + if (deflt) *deflt = int(HanningWindow); return int(m_windowType); } if (name == "Resample Quality") { if (min) *min = 0; if (max) *max = 2; + if (deflt) *deflt = 1; return m_resampleQuality; }