Mercurial > hg > svapp
changeset 173:5a2845883dd6
* update to putative segmenter program
author | Chris Cannam |
---|---|
date | Tue, 09 Jun 2009 13:03:06 +0000 |
parents | f6a8fc35df93 |
children | e109e432b5c5 |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
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); + } + } } }