changeset 1337:4f9a3c84be60 zoom

Fix accidental always-auto-normalise
author Chris Cannam
date Tue, 25 Sep 2018 12:52:08 +0100
parents 43296804c473
children 6d091348e4e9
files layer/WaveformLayer.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/layer/WaveformLayer.cpp	Mon Sep 24 14:40:48 2018 +0100
+++ b/layer/WaveformLayer.cpp	Tue Sep 25 12:52:08 2018 +0100
@@ -609,8 +609,10 @@
     while ((int)m_effectiveGains.size() <= maxChannel) {
         m_effectiveGains.push_back(m_gain);
     }
-    for (int ch = minChannel; ch <= maxChannel; ++ch) {
-        m_effectiveGains[ch] = getNormalizeGain(v, ch);
+    if (m_autoNormalize) {
+        for (int ch = minChannel; ch <= maxChannel; ++ch) {
+            m_effectiveGains[ch] = getNormalizeGain(v, ch);
+        }
     }
 
     if (v->getZoomLevel().zone == ZoomLevel::FramesPerPixel) {