Mercurial > hg > svgui
diff layer/FlexiNoteLayer.cpp @ 696:e77b1673e17e tonioni
Pull out log and linear vertical scales into their own classes, make some improvements to log numbering
author | Chris Cannam |
---|---|
date | Wed, 04 Dec 2013 11:35:08 +0000 |
parents | 6d9624e0ac55 |
children | ceb9a2992d96 |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Tue Dec 03 18:06:44 2013 +0000 +++ b/layer/FlexiNoteLayer.cpp Wed Dec 04 11:35:08 2013 +0000 @@ -860,19 +860,29 @@ int FlexiNoteLayer::getVerticalScaleWidth(View *, bool, QPainter &paint) const { - return 10; + if (m_verticalScale == LinearScale || + m_verticalScale == AutoAlignScale) { + return 0; + } else { + return 10; + } } void FlexiNoteLayer::paintVerticalScale(View *v, bool, QPainter &paint, QRect) const { - float fmin, fmax; - bool log; - QString unit; - if (!getValueExtents(fmin, fmax, log, unit)) return; - PianoScale().paintPianoVertical - (v, paint, QRect(0, 0, 10, v->height()), fmin, fmax); - paint.drawLine(10, 0, 10, v->height()); + if (m_verticalScale == LinearScale || + m_verticalScale == AutoAlignScale) { + return; + } else { + float fmin, fmax; + bool log; + QString unit; + if (!getValueExtents(fmin, fmax, log, unit)) return; + PianoScale().paintPianoVertical + (v, paint, QRect(0, 0, 10, v->height()), fmin, fmax); + paint.drawLine(10, 0, 10, v->height()); + } } void