Skip to content

Commit

Permalink
fix: Issue 6807: Marked notes bleed into note... (#6812)
Browse files Browse the repository at this point in the history
Issue was caused by an obiwan (off-by-one)
The 'if (y > limit)' test was broken by an incorrect inequality,
 should be >=, and a graphical adjustment made previously in the
 'y = ...' statement. I perserved the graphical adjustment and
 fixed the test to be 'if (y >= limit - 1) { break; }'
  • Loading branch information
consolegrl committed Aug 18, 2023
1 parent 4ff9507 commit 98c5e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3357,7 +3357,7 @@ void PianoRoll::paintEvent(QPaintEvent * pe )
const int key_num = m_markedSemiTones.at(x);
const int y = keyAreaBottom() - 1 - m_keyLineHeight *
(key_num - m_startKey + 1);
if(y > keyAreaBottom()) { break; }
if(y >= keyAreaBottom() - 1) { break; }
p.fillRect(m_whiteKeyWidth + 1,
y,
width() - 10,
Expand Down

0 comments on commit 98c5e6a

Please sign in to comment.