Fix scale highlighting during vertical zooming (#6761)
Vertically zooming the piano roll caused highlighted semitones to drift from the actual note positions. This 2-line fix ensures the marked semitones are aligned with the grid lines and notes at all allowed vertical zoom levels.
This commit is contained in:
@@ -3355,11 +3355,11 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
|
||||
for(x = 0; x < m_markedSemiTones.size(); ++x)
|
||||
{
|
||||
const int key_num = m_markedSemiTones.at(x);
|
||||
const int y = keyAreaBottom() + 5 - m_keyLineHeight *
|
||||
const int y = keyAreaBottom() - 1 - m_keyLineHeight *
|
||||
(key_num - m_startKey + 1);
|
||||
if(y > keyAreaBottom()) { break; }
|
||||
p.fillRect(m_whiteKeyWidth + 1,
|
||||
y - m_keyLineHeight / 2,
|
||||
y,
|
||||
width() - 10,
|
||||
m_keyLineHeight + 1,
|
||||
m_markedSemitoneColor);
|
||||
|
||||
Reference in New Issue
Block a user