Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.cpp @ 1133:b4b155cfd8b4 spectrogram-minor-refactor
Fix vertical zoom/scroll in colour 3d plot layer
author | Chris Cannam |
---|---|
date | Tue, 02 Aug 2016 11:42:24 +0100 |
parents | ee98d587cd1a |
children | 4e7ed3252d80 |
comparison
equal
deleted
inserted
replaced
1132:745a868f0abf | 1133:b4b155cfd8b4 |
---|---|
664 if (!m_model) return false; | 664 if (!m_model) return false; |
665 | 665 |
666 m_miny = int(lrint(min)); | 666 m_miny = int(lrint(min)); |
667 m_maxy = int(lrint(max)); | 667 m_maxy = int(lrint(max)); |
668 | 668 |
669 invalidateRenderers(); | |
670 | |
669 emit layerParametersChanged(); | 671 emit layerParametersChanged(); |
670 return true; | 672 return true; |
671 } | 673 } |
672 | 674 |
673 bool | 675 bool |
710 m_miny = int(lrint(centre - dist/2.0)); | 712 m_miny = int(lrint(centre - dist/2.0)); |
711 if (m_miny < 0) m_miny = 0; | 713 if (m_miny < 0) m_miny = 0; |
712 m_maxy = m_miny + dist; | 714 m_maxy = m_miny + dist; |
713 if (m_maxy > m_model->getHeight()) m_maxy = m_model->getHeight(); | 715 if (m_maxy > m_model->getHeight()) m_maxy = m_model->getHeight(); |
714 | 716 |
717 invalidateRenderers(); | |
718 | |
715 // SVDEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): after: miny = " << m_miny << ", maxy = " << m_maxy << endl; | 719 // SVDEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): after: miny = " << m_miny << ", maxy = " << m_maxy << endl; |
716 | 720 |
717 emit layerParametersChanged(); | 721 emit layerParametersChanged(); |
718 } | 722 } |
719 | 723 |