comparison layer/SpectrumLayer.cpp @ 345:8c3fb13ef11c

* Fix 1864770 overlaid spectrum layers drawn wrong
author Chris Cannam
date Tue, 08 Jan 2008 15:48:39 +0000
parents 2f83b6e3b8ca
children 369a197737c7
comparison
equal deleted inserted replaced
344:832d246b327b 345:8c3fb13ef11c
52 } 52 }
53 53
54 void 54 void
55 SpectrumLayer::setModel(DenseTimeValueModel *model) 55 SpectrumLayer::setModel(DenseTimeValueModel *model)
56 { 56 {
57 std::cerr << "SpectrumLayer::setModel(" << model << ") from " << m_originModel << std::endl;
58
57 if (m_originModel == model) return; 59 if (m_originModel == model) return;
58 m_originModel = model; 60 m_originModel = model;
59 61
60 if (m_sliceableModel) { 62 if (m_sliceableModel) {
61 const Model *oldModel = m_sliceableModel; 63 const Model *oldModel = m_sliceableModel;
657 659
658 int pkh = 0; 660 int pkh = 0;
659 //!!! if (m_binScale == LogBins) { 661 //!!! if (m_binScale == LogBins) {
660 pkh = 10; 662 pkh = 10;
661 //!!! } 663 //!!! }
664
665 paint.save();
662 666
663 if (fft && m_showPeaks) { 667 if (fft && m_showPeaks) {
664 668
665 // draw peak lines 669 // draw peak lines
666 670
797 801
798 ppx = px; 802 ppx = px;
799 px = x; 803 px = x;
800 } 804 }
801 // } 805 // }
806
807 paint.restore();
802 } 808 }
803 809
804 void 810 void
805 SpectrumLayer::getBiasCurve(BiasCurve &curve) const 811 SpectrumLayer::getBiasCurve(BiasCurve &curve) const
806 { 812 {