comparison data/model/AlignmentModel.cpp @ 1564:5f9c9d8c3de6 zoom

Merge from default branch
author Chris Cannam
date Tue, 06 Nov 2018 08:58:57 +0000
parents d3814e07b8aa
children 70e172e6cc59
comparison
equal deleted inserted replaced
1549:2fec0d9bd7ac 1564:5f9c9d8c3de6
99 bool 99 bool
100 AlignmentModel::isReady(int *completion) const 100 AlignmentModel::isReady(int *completion) const
101 { 101 {
102 if (!m_pathBegun && m_rawPath) { 102 if (!m_pathBegun && m_rawPath) {
103 if (completion) *completion = 0; 103 if (completion) *completion = 0;
104 #ifdef DEBUG_ALIGNMENT_MODEL
105 SVDEBUG << "AlignmentModel::isReady: path not begun" << endl;
106 #endif
104 return false; 107 return false;
105 } 108 }
106 if (m_pathComplete) { 109 if (m_pathComplete) {
107 if (completion) *completion = 100; 110 if (completion) *completion = 100;
111 #ifdef DEBUG_ALIGNMENT_MODEL
112 SVDEBUG << "AlignmentModel::isReady: path complete" << endl;
113 #endif
108 return true; 114 return true;
109 } 115 }
110 if (!m_rawPath) { 116 if (!m_rawPath) {
111 // lack of raw path could mean path is complete (in which case 117 // lack of raw path could mean path is complete (in which case
112 // m_pathComplete true above) or else no alignment has been 118 // m_pathComplete true above) or else no alignment has been
113 // set at all yet (this case) 119 // set at all yet (this case)
114 if (completion) *completion = 0; 120 if (completion) *completion = 0;
121 #ifdef DEBUG_ALIGNMENT_MODEL
122 SVDEBUG << "AlignmentModel::isReady: no raw path" << endl;
123 #endif
115 return false; 124 return false;
116 } 125 }
117 return m_rawPath->isReady(completion); 126 return m_rawPath->isReady(completion);
118 } 127 }
119 128
379 AlignmentModel::setPath(PathModel *path) 388 AlignmentModel::setPath(PathModel *path)
380 { 389 {
381 if (m_path) m_path->aboutToDelete(); 390 if (m_path) m_path->aboutToDelete();
382 delete m_path; 391 delete m_path;
383 m_path = path; 392 m_path = path;
393 m_pathComplete = true;
384 #ifdef DEBUG_ALIGNMENT_MODEL 394 #ifdef DEBUG_ALIGNMENT_MODEL
385 cerr << "AlignmentModel::setPath: path = " << m_path << endl; 395 cerr << "AlignmentModel::setPath: path = " << m_path << endl;
386 #endif 396 #endif
387 constructReversePath(); 397 constructReversePath();
388 #ifdef DEBUG_ALIGNMENT_MODEL 398 #ifdef DEBUG_ALIGNMENT_MODEL