comparison layer/WaveformLayer.cpp @ 1337:4f9a3c84be60 zoom

Fix accidental always-auto-normalise
author Chris Cannam
date Tue, 25 Sep 2018 12:52:08 +0100
parents 43296804c473
children 6d091348e4e9
comparison
equal deleted inserted replaced
1336:43296804c473 1337:4f9a3c84be60
607 #endif 607 #endif
608 608
609 while ((int)m_effectiveGains.size() <= maxChannel) { 609 while ((int)m_effectiveGains.size() <= maxChannel) {
610 m_effectiveGains.push_back(m_gain); 610 m_effectiveGains.push_back(m_gain);
611 } 611 }
612 for (int ch = minChannel; ch <= maxChannel; ++ch) { 612 if (m_autoNormalize) {
613 m_effectiveGains[ch] = getNormalizeGain(v, ch); 613 for (int ch = minChannel; ch <= maxChannel; ++ch) {
614 m_effectiveGains[ch] = getNormalizeGain(v, ch);
615 }
614 } 616 }
615 617
616 if (v->getZoomLevel().zone == ZoomLevel::FramesPerPixel) { 618 if (v->getZoomLevel().zone == ZoomLevel::FramesPerPixel) {
617 619
618 vector<RangeSummarisableTimeValueModel::RangeBlock> ranges; 620 vector<RangeSummarisableTimeValueModel::RangeBlock> ranges;