changeset 114:a46d68ae3c3e 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 8a38b9aeba12
children c9930ec7a3f9
files main/MainWindow.cpp main/PreferencesDialog.cpp
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Fri Mar 02 13:01:41 2007 +0000
+++ b/main/MainWindow.cpp	Fri Mar 02 14:00:12 2007 +0000
@@ -4458,7 +4458,7 @@
 #endif
 #endif
 #ifdef HAVE_VAMP
-    aboutText += tr("<br>With Vamp plugin support (API v%1, host SDK v%2) &copy; Chris Cannam").arg(VAMP_API_VERSION).arg(VAMP_HOSTSDK_VERSION);
+    aboutText += tr("<br>With Vamp plugin support (API v%1, host SDK v%2) &copy; Chris Cannam").arg(VAMP_API_VERSION).arg(VAMP_SDK_VERSION);
 #endif
     aboutText += tr("<br>With LADSPA plugin support (API v%1) &copy; Richard Furse, Paul Davis, Stefan Westerfeld").arg(LADSPA_VERSION);
     aboutText += tr("<br>With DSSI plugin support (API v%1) &copy; Chris Cannam, Steve Harris, Sean Bolton").arg(DSSI_VERSION);
--- a/main/PreferencesDialog.cpp	Fri Mar 02 13:01:41 2007 +0000
+++ b/main/PreferencesDialog.cpp	Fri Mar 02 14:00:12 2007 +0000
@@ -49,10 +49,10 @@
     // refer to it
     m_applyButton = new QPushButton(tr("Apply"));
 
-    int min, max, i;
+    int min, max, deflt, i;
 
     m_windowType = WindowType(prefs->getPropertyRangeAndValue
-                              ("Window Type", &min, &max));
+                              ("Window Type", &min, &max, &deflt));
     m_windowTypeSelector = new WindowTypeSelector(m_windowType);
 
     connect(m_windowTypeSelector, SIGNAL(windowTypeChanged(WindowType)),
@@ -67,7 +67,8 @@
             this, SLOT(smoothSpectrogramChanged(int)));
 
     QComboBox *propertyLayout = new QComboBox;
-    int pl = prefs->getPropertyRangeAndValue("Property Box Layout", &min, &max);
+    int pl = prefs->getPropertyRangeAndValue("Property Box Layout", &min, &max,
+                                             &deflt);
     m_propertyLayout = pl;
 
     for (i = min; i <= max; ++i) {
@@ -94,7 +95,8 @@
 
     QComboBox *resampleQuality = new QComboBox;
 
-    int rsq = prefs->getPropertyRangeAndValue("Resample Quality", &min, &max);
+    int rsq = prefs->getPropertyRangeAndValue("Resample Quality", &min, &max,
+                                              &deflt);
     m_resampleQuality = rsq;
 
     for (i = min; i <= max; ++i) {