Mercurial > hg > svcore
diff data/model/AlignmentModel.cpp @ 1696:187c76c40c6f single-point
Ensure a self-alignment is always reported as complete, since there is nothing to calculate
author | Chris Cannam |
---|---|
date | Wed, 01 May 2019 11:45:28 +0100 |
parents | d08b560102a1 |
children | 28f9ff7864c6 |
line wrap: on
line diff
--- a/data/model/AlignmentModel.cpp Thu Apr 25 17:06:33 2019 +0100 +++ b/data/model/AlignmentModel.cpp Wed May 01 11:45:28 2019 +0100 @@ -48,6 +48,13 @@ if (m_rawPath && m_rawPath->isReady()) { pathCompletionChanged(); } + + if (m_reference == m_aligned) { + // Trivial alignment, e.g. of main model to itself, which we + // record so that we can distinguish the reference model for + // alignments from an unaligned model. No path required + m_pathComplete = true; + } } AlignmentModel::~AlignmentModel() @@ -101,14 +108,14 @@ if (!m_pathBegun && m_rawPath) { if (completion) *completion = 0; #ifdef DEBUG_ALIGNMENT_MODEL - SVDEBUG << "AlignmentModel::isReady: path not begun" << endl; + SVCERR << "AlignmentModel::isReady: path not begun" << endl; #endif return false; } if (m_pathComplete) { if (completion) *completion = 100; #ifdef DEBUG_ALIGNMENT_MODEL - SVDEBUG << "AlignmentModel::isReady: path complete" << endl; + SVCERR << "AlignmentModel::isReady: path complete" << endl; #endif return true; } @@ -118,7 +125,7 @@ // set at all yet (this case) if (completion) *completion = 0; #ifdef DEBUG_ALIGNMENT_MODEL - SVDEBUG << "AlignmentModel::isReady: no raw path" << endl; + SVCERR << "AlignmentModel::isReady: no raw path" << endl; #endif return false; }