Mercurial > hg > svapp
diff framework/Document.cpp @ 761:6429a164b7e1 pitch-align
Schedule alignments with a small delay to avoid too much UI unresponsiveness. Also overhaul error reporting to use signals throughout.
author | Chris Cannam |
---|---|
date | Wed, 06 May 2020 11:45:27 +0100 |
parents | 36772d79cf44 |
children | cf4e0f3c2406 1d6cca5a5621 |
line wrap: on
line diff
--- a/framework/Document.cpp Mon Apr 27 14:59:56 2020 +0100 +++ b/framework/Document.cpp Wed May 06 11:45:27 2020 +0100 @@ -57,6 +57,9 @@ connect(m_align, SIGNAL(alignmentComplete(ModelId)), this, SIGNAL(alignmentComplete(ModelId))); + + connect(m_align, SIGNAL(alignmentFailed(ModelId, QString)), + this, SIGNAL(alignmentFailed(ModelId, QString))); } Document::~Document() @@ -555,7 +558,7 @@ } if (m_autoAlignment) { - SVDEBUG << "Document::setMainModel: auto-alignment is on, aligning model if possible" << endl; + SVDEBUG << "Document::setMainModel: auto-alignment is on, aligning main model if applicable" << endl; alignModel(m_mainModel); } else { SVDEBUG << "Document::setMainModel: auto-alignment is off" << endl; @@ -1145,11 +1148,7 @@ << endl; } - QString err; - if (!m_align->alignModel(this, m_mainModel, modelId, err)) { - SVCERR << "Alignment failed: " << err << endl; - emit alignmentFailed(err); - } + m_align->scheduleAlignment(this, m_mainModel, modelId); } void