From 98c5e6af5d0241f458d6d6f5545ad76ca8b36485 Mon Sep 17 00:00:00 2001 From: consolegrl <5942029+consolegrl@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:26:06 -0400 Subject: [PATCH] fix: Issue 6807: Marked notes bleed into note... (#6812) 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; }' --- src/gui/editors/PianoRoll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 3ec008ecb..337b36b36 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -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,