Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 53:94f1c2747de4
* Tidy up plugin parameter dialog by switching it to a simple constructor
with separate methods for passing in the additional options if necessary
* Fix sizing problem on advanced pane toggle in plugin parameter dialog
* Make a start on passing in list of candidate input models for transform
author | Chris Cannam |
---|---|
date | Wed, 11 Oct 2006 16:18:51 +0000 |
parents | 17787ea5f732 |
children | ec77936c268e |
line wrap: on
line diff
--- a/main/MainWindow.cpp Tue Oct 10 19:04:57 2006 +0000 +++ b/main/MainWindow.cpp Wed Oct 11 16:18:51 2006 +0000 @@ -2967,8 +2967,34 @@ PluginTransform::ExecutionContext context(channel); + std::vector<Model *> candidateInputModels; + candidateInputModels.push_back(m_document->getMainModel()); + + //!!! rationalise this (via document method for example) + for (int i = 0; i < m_paneStack->getPaneCount(); ++i) { + Pane *ip = m_paneStack->getPane(i); + if (!ip) continue; + for (int j = 0; j < ip->getLayerCount(); ++j) { + Layer *jl = ip->getLayer(j); + if (jl) { + Model *model = jl->getModel(); + DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *> + (model); + if (dtvm) { + int k; + for (k = 0; k < candidateInputModels.size(); ++k) { + if (candidateInputModels[k] == dtvm) break; + } + if (k == candidateInputModels.size()) { + candidateInputModels.push_back(dtvm); + } + } + } + } + } + bool ok = factory->getConfigurationForTransform(transform, - m_document->getMainModel(), + candidateInputModels, context, configurationXml, m_playSource);