Mercurial > hg > svgui
diff widgets/PluginParameterDialog.cpp @ 374:64e84e5efb76 spectrogram-cache-rejig
* Merge from trunk
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 11:59:42 +0000 |
parents | b7d45fed8146 |
children | e1a9e478b7f2 |
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.cpp Mon Nov 19 15:50:37 2007 +0000 +++ b/widgets/PluginParameterDialog.cpp Wed Feb 27 11:59:42 2008 +0000 @@ -440,7 +440,8 @@ } void -PluginParameterDialog::setCandidateInputModels(const QStringList &models) +PluginParameterDialog::setCandidateInputModels(const QStringList &models, + QString defaultModel) { m_inputModels->clear(); @@ -449,15 +450,17 @@ QString lastModel = settings.value("lastinputmodel").toString(); settings.endGroup(); + if (defaultModel == "") defaultModel = lastModel; + m_inputModels->show(); m_inputModelList = models; m_inputModels->addItems(TextAbbrev::abbreviate(models, 80)); m_inputModels->setCurrentIndex(0); - if (lastModel != "") { + if (defaultModel != "") { for (int i = 0; i < models.size(); ++i) { - if (lastModel == models[i]) { + if (defaultModel == models[i]) { m_inputModels->setCurrentIndex(i); m_currentInputModel = models[i]; break;