@@ -2896,7 +2896,6 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
28962896 }
28972897 }
28982898
2899-
29002899 // Draw the vertical beat lines
29012900 int ticksPerBeat = DefaultTicksPerTact /
29022901 Engine::getSong ()->getTimeSigModel ().getDenominator ();
@@ -2917,22 +2916,22 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
29172916 p.setPen ( barLineColor () );
29182917 p.drawLine ( x, PR_TOP_MARGIN, x, height () - PR_BOTTOM_MARGIN );
29192918 }
2920- }
2921-
2922- // draw marked semitones after the grid
2923- for ( int i = 0 ; i < m_markedSemiTones.size (); i++ )
2924- {
2925- const int key_num = m_markedSemiTones.at ( i );
2926- const int y = keyAreaBottom () + 5
2927- - KEY_LINE_HEIGHT * ( key_num - m_startKey + 1 );
29282919
2929- if ( y > keyAreaBottom () )
2920+ // draw marked semitones after the grid
2921+ for ( int i = 0 ; i < m_markedSemiTones.size (); i++ )
29302922 {
2931- break ;
2932- }
2923+ const int key_num = m_markedSemiTones.at ( i );
2924+ const int y = keyAreaBottom () + 5
2925+ - KEY_LINE_HEIGHT * ( key_num - m_startKey + 1 );
29332926
2934- p.fillRect ( WHITE_KEY_WIDTH + 1 , y - KEY_LINE_HEIGHT / 2 , width () - 10 , KEY_LINE_HEIGHT + 1 ,
2935- markedSemitoneColor () );
2927+ if ( y > keyAreaBottom () )
2928+ {
2929+ break ;
2930+ }
2931+
2932+ p.fillRect ( WHITE_KEY_WIDTH + 1 , y - KEY_LINE_HEIGHT / 2 , width () - 10 , KEY_LINE_HEIGHT + 1 ,
2933+ markedSemitoneColor () );
2934+ }
29362935 }
29372936
29382937 // following code draws all notes in visible area
0 commit comments