comparison 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
comparison
equal deleted inserted replaced
47:d97a7ed7aa39 48:c6328c8d6536
317 317
318 for (size_t k = 0; k < obsoleteLayers.size(); ++k) { 318 for (size_t k = 0; k < obsoleteLayers.size(); ++k) {
319 deleteLayer(obsoleteLayers[k], true); 319 deleteLayer(obsoleteLayers[k], true);
320 } 320 }
321 321
322 for (ModelMap::iterator i = m_models.begin(); i != m_models.end(); ++i) {
323 if (i->first->getAlignmentReference() == oldMainModel) {
324 alignModel(i->first);
325 }
326 }
327
322 emit mainModelChanged(m_mainModel); 328 emit mainModelChanged(m_mainModel);
323 329
324 // we already emitted modelAboutToBeDeleted for this 330 // we already emitted modelAboutToBeDeleted for this
325 delete oldMainModel; 331 delete oldMainModel;
326 } 332 }
670 if (!m_mainModel || model == m_mainModel) return; 676 if (!m_mainModel || model == m_mainModel) return;
671 677
672 RangeSummarisableTimeValueModel *rm = 678 RangeSummarisableTimeValueModel *rm =
673 dynamic_cast<RangeSummarisableTimeValueModel *>(model); 679 dynamic_cast<RangeSummarisableTimeValueModel *>(model);
674 if (!rm) return; 680 if (!rm) return;
681
682 if (rm->getAlignmentReference() == m_mainModel) return;
675 683
676 // This involves creating three new models: 684 // This involves creating three new models:
677 685
678 // 1. an AggregateWaveModel to provide the mixdowns of the main 686 // 1. an AggregateWaveModel to provide the mixdowns of the main
679 // model and the new model in its two channels, as input to the 687 // model and the new model in its two channels, as input to the