Mercurial > hg > svgui
comparison view/AlignmentView.cpp @ 1619:36634b427d61
Fix wrongly-written test which made the mapping alignments line up wrongly in some cases where adjacent panes were related (but, because of this test, the alignment view thought they were not)
author | Chris Cannam |
---|---|
date | Tue, 18 Aug 2020 14:49:36 +0100 |
parents | 911330a28a7c |
children | dc0e47f234a2 |
comparison
equal
deleted
inserted
replaced
1618:f67e9e12e101 | 1619:36634b427d61 |
---|---|
190 #endif | 190 #endif |
191 | 191 |
192 int w = width(); | 192 int w = width(); |
193 int h = height(); | 193 int h = height(); |
194 | 194 |
195 if (m_leftmostAbove > 0) { | 195 if (m_leftmostAbove >= 0) { |
196 | 196 |
197 #ifdef DEBUG_ALIGNMENT_VIEW | |
198 SVCERR << "AlignmentView: m_leftmostAbove = " << m_leftmostAbove | |
199 << ", we have a relationship with the pane above us: showing " | |
200 << "mappings in relation to that" << endl; | |
201 #endif | |
202 | |
197 for (const auto &km: m_fromAboveMap) { | 203 for (const auto &km: m_fromAboveMap) { |
198 | 204 |
199 sv_frame_t af = km.first; | 205 sv_frame_t af = km.first; |
200 sv_frame_t bf = km.second; | 206 sv_frame_t bf = km.second; |
201 | 207 |
211 } | 217 } |
212 } | 218 } |
213 } else if (m_reference != nullptr) { | 219 } else if (m_reference != nullptr) { |
214 // the below has nothing in common with the above: show things | 220 // the below has nothing in common with the above: show things |
215 // in common with the reference instead | 221 // in common with the reference instead |
216 | 222 |
223 #ifdef DEBUG_ALIGNMENT_VIEW | |
224 SVCERR << "AlignmentView: m_leftmostAbove = " << m_leftmostAbove | |
225 << ", we have no relationship with the pane above us: showing " | |
226 << "mappings in relation to the reference instead" << endl; | |
227 #endif | |
228 | |
217 for (const auto &km: m_fromReferenceMap) { | 229 for (const auto &km: m_fromReferenceMap) { |
218 | 230 |
219 sv_frame_t af = km.first; | 231 sv_frame_t af = km.first; |
220 sv_frame_t bf = km.second; | 232 sv_frame_t bf = km.second; |
221 | 233 |