diff 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
line wrap: on
line diff
--- a/layer/NoteLayer.cpp	Fri Nov 28 13:36:13 2008 +0000
+++ b/layer/NoteLayer.cpp	Mon Dec 01 16:45:17 2008 +0000
@@ -223,13 +223,13 @@
     }
 
     if (m_scaleMinimum == m_scaleMaximum) {
-        m_scaleMinimum = m_model->getValueMinimum();
-        m_scaleMaximum = m_model->getValueMaximum();
+        min = m_model->getValueMinimum();
+        max = m_model->getValueMaximum();
+    } else {
+        min = m_scaleMinimum;
+        max = m_scaleMaximum;
     }
 
-    min = m_scaleMinimum;
-    max = m_scaleMaximum;
-
     if (shouldConvertMIDIToHz()) {
         min = Pitch::getFrequencyForPitch(lrintf(min));
         max = Pitch::getFrequencyForPitch(lrintf(max + 1));