comparison data/model/Model.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 f97d64b8674f
children 601851995f4b
comparison
equal deleted inserted replaced
1695:cd6be949a16a 1696:187c76c40c6f
18 18
19 #include <QTextStream> 19 #include <QTextStream>
20 20
21 #include <iostream> 21 #include <iostream>
22 22
23 //#define DEBUG_COMPLETION 1
24
23 Model::~Model() 25 Model::~Model()
24 { 26 {
25 SVDEBUG << "Model::~Model(" << this << ")" << endl; 27 SVDEBUG << "Model::~Model(" << this << ")" << endl;
26 28
27 if (!m_aboutToDelete) { 29 if (!m_aboutToDelete) {
161 } 163 }
162 164
163 int 165 int
164 Model::getAlignmentCompletion() const 166 Model::getAlignmentCompletion() const
165 { 167 {
166 // SVDEBUG << "Model::getAlignmentCompletion: m_alignment = " 168 #ifdef DEBUG_COMPLETION
167 // << m_alignment << endl; 169 SVCERR << "Model(" << this << ")::getAlignmentCompletion: m_alignment = "
170 << m_alignment << endl;
171 #endif
168 if (!m_alignment) { 172 if (!m_alignment) {
169 if (m_sourceModel) return m_sourceModel->getAlignmentCompletion(); 173 if (m_sourceModel) return m_sourceModel->getAlignmentCompletion();
170 else return 100; 174 else return 100;
171 } 175 }
172 int completion = 0; 176 int completion = 0;
173 (void)m_alignment->isReady(&completion); 177 (void)m_alignment->isReady(&completion);
174 // SVDEBUG << " -> " << completion << endl; 178 #ifdef DEBUG_COMPLETION
179 SVCERR << "Model(" << this << ")::getAlignmentCompletion: completion = " << completion
180 << endl;
181 #endif
175 return completion; 182 return completion;
176 } 183 }
177 184
178 QString 185 QString
179 Model::getTitle() const 186 Model::getTitle() const