Mercurial > hg > svapp
diff framework/Document.cpp @ 48:c6328c8d6536
* Add Align button to main window; use it
author | Chris Cannam |
---|---|
date | Thu, 25 Oct 2007 15:45:12 +0000 |
parents | d97a7ed7aa39 |
children | a8bb5b2aca4c |
line wrap: on
line diff
--- a/framework/Document.cpp Thu Oct 25 11:32:54 2007 +0000 +++ b/framework/Document.cpp Thu Oct 25 15:45:12 2007 +0000 @@ -319,6 +319,12 @@ deleteLayer(obsoleteLayers[k], true); } + for (ModelMap::iterator i = m_models.begin(); i != m_models.end(); ++i) { + if (i->first->getAlignmentReference() == oldMainModel) { + alignModel(i->first); + } + } + emit mainModelChanged(m_mainModel); // we already emitted modelAboutToBeDeleted for this @@ -672,6 +678,8 @@ RangeSummarisableTimeValueModel *rm = dynamic_cast<RangeSummarisableTimeValueModel *>(model); if (!rm) return; + + if (rm->getAlignmentReference() == m_mainModel) return; // This involves creating three new models: