# HG changeset patch # User Chris Cannam # Date 1537876328 -3600 # Node ID 4f9a3c84be6039cd0d2dd292ff331f8df4592a15 # Parent 43296804c47342738c58306d4ab47f1499e5da2c Fix accidental always-auto-normalise diff -r 43296804c473 -r 4f9a3c84be60 layer/WaveformLayer.cpp --- 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) {