Mercurial > hg > svgui
diff widgets/PluginParameterDialog.cpp @ 336:4a542ba875c2
* Improvements to layer summary dialog (LayerTree, LayerTreeDialog), & rename.
It's still rather unstable though.
author | Chris Cannam |
---|---|
date | Wed, 28 Nov 2007 17:45:37 +0000 |
parents | b7d45fed8146 |
children | e1a9e478b7f2 |
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.cpp Fri Nov 23 16:48:23 2007 +0000 +++ b/widgets/PluginParameterDialog.cpp Wed Nov 28 17:45:37 2007 +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;