Mercurial > hg > svapp
diff framework/Document.cpp @ 404:08a45e4cf1b1 tonioni
Update subrepos and merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 02 Sep 2014 16:23:48 +0100 |
parents | a4c2a4685cf1 |
children | edfdb1d5db3c |
line wrap: on
line diff
--- a/framework/Document.cpp Fri Jul 18 13:25:11 2014 +0100 +++ b/framework/Document.cpp Tue Sep 02 16:23:48 2014 +0100 @@ -565,6 +565,7 @@ } if (m_autoAlignment) { + SVDEBUG << "Document::setMainModel: auto-alignment is on, aligning model if possible" << endl; alignModel(m_mainModel); } @@ -641,7 +642,12 @@ cerr << endl; #endif - if (m_autoAlignment) alignModel(model); + if (m_autoAlignment) { + SVDEBUG << "Document::addImportedModel: auto-alignment is on, aligning model if possible" << endl; + alignModel(model); + } else { + SVDEBUG << "Document(" << this << "): addImportedModel: auto-alignment is off" << endl; + } emit modelAdded(model); } @@ -671,7 +677,10 @@ cerr << endl; #endif - if (m_autoAlignment) alignModel(model); + if (m_autoAlignment) { + SVDEBUG << "Document::addAdditionalModel: auto-alignment is on, aligning model if possible" << endl; + alignModel(model); + } emit modelAdded(model); } @@ -1044,14 +1053,22 @@ void Document::alignModel(Model *model) { - if (!m_mainModel) return; + SVDEBUG << "Document::alignModel(" << model << ")" << endl; + + if (!m_mainModel) { + SVDEBUG << "(no main model to align to)" << endl; + return; + } RangeSummarisableTimeValueModel *rm = dynamic_cast<RangeSummarisableTimeValueModel *>(model); - if (!rm) return; + if (!rm) { + SVDEBUG << "(main model is not alignable-to)" << endl; + return; + } if (rm->getAlignmentReference() == m_mainModel) { - SVDEBUG << "Document::alignModel: model " << rm << " is already aligned to main model " << m_mainModel << endl; + SVDEBUG << "(model " << rm << " is already aligned to main model " << m_mainModel << ")" << endl; return; }