Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 173:5a2845883dd6
* update to putative segmenter program
author | Chris Cannam |
---|---|
date | Tue, 09 Jun 2009 13:03:06 +0000 |
parents | 875a21ad7a95 |
children | 366f044c20e4 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue Jun 09 13:02:16 2009 +0000 +++ b/framework/MainWindowBase.cpp Tue Jun 09 13:03:06 2009 +0000 @@ -2636,8 +2636,12 @@ // Check whether we need to add or remove model from play source Model *model = layer->getModel(); if (model) { + Model *source = model->getSourceModel(); if (inAView) { m_playSource->addModel(model); + if (source && source != model) { + m_playSource->addModel(source); + } } else { bool found = false; for (int i = 0; i < m_paneStack->getPaneCount(); ++i) { @@ -2645,14 +2649,20 @@ if (!pane) continue; for (int j = 0; j < pane->getLayerCount(); ++j) { Layer *pl = pane->getLayer(j); - if (pl && pl->getModel() == model) { + if (pl && (pl->getModel() == model || + pl->getModel() == source)) { found = true; break; } } if (found) break; } - if (!found) m_playSource->removeModel(model); + if (!found) { + m_playSource->removeModel(model); + if (source && source != model) { + m_playSource->removeModel(source); + } + } } }