Mercurial > hg > svgui
comparison layer/NoteLayer.cpp @ 455:747a58d45d56
* Fix incorrect starting extents in derived note & time-value layers
(happening when top==bottom==0 and thus recalculated from model
extents before model is complete)
author | Chris Cannam |
---|---|
date | Mon, 01 Dec 2008 16:45:17 +0000 |
parents | 4a14499fb184 |
children | 0990b95140e3 |
comparison
equal
deleted
inserted
replaced
454:e2a40fdadd8c | 455:747a58d45d56 |
---|---|
221 max = Pitch::getFrequencyForPitch(127); | 221 max = Pitch::getFrequencyForPitch(127); |
222 return true; | 222 return true; |
223 } | 223 } |
224 | 224 |
225 if (m_scaleMinimum == m_scaleMaximum) { | 225 if (m_scaleMinimum == m_scaleMaximum) { |
226 m_scaleMinimum = m_model->getValueMinimum(); | 226 min = m_model->getValueMinimum(); |
227 m_scaleMaximum = m_model->getValueMaximum(); | 227 max = m_model->getValueMaximum(); |
228 } | 228 } else { |
229 | 229 min = m_scaleMinimum; |
230 min = m_scaleMinimum; | 230 max = m_scaleMaximum; |
231 max = m_scaleMaximum; | 231 } |
232 | 232 |
233 if (shouldConvertMIDIToHz()) { | 233 if (shouldConvertMIDIToHz()) { |
234 min = Pitch::getFrequencyForPitch(lrintf(min)); | 234 min = Pitch::getFrequencyForPitch(lrintf(min)); |
235 max = Pitch::getFrequencyForPitch(lrintf(max + 1)); | 235 max = Pitch::getFrequencyForPitch(lrintf(max + 1)); |
236 } | 236 } |