From a4301de1f1c784bd0ae8d80e111b6c0849f9e175 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Sun, 5 May 2019 12:39:36 +0900 Subject: [PATCH] Don't draw note detuning info over the volume/panning area (#4965) --- src/gui/editors/PianoRoll.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 7d9f95257a6..18995bfde21 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -883,6 +883,9 @@ void PianoRoll::drawDetuningInfo( QPainter & _p, const Note * _n, int _x, { int middle_y = _y + KEY_LINE_HEIGHT / 2; _p.setPen( noteColor() ); + _p.setClipRect(WHITE_KEY_WIDTH, PR_TOP_MARGIN, + width() - WHITE_KEY_WIDTH, + keyAreaBottom() - PR_TOP_MARGIN); int old_x = 0; int old_y = 0; @@ -3077,6 +3080,10 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) } } + p.setClipRect(WHITE_KEY_WIDTH, PR_TOP_MARGIN, + width() - WHITE_KEY_WIDTH, + height() - PR_TOP_MARGIN - PR_TOP_MARGIN); + p.setPen( QPen( noteColor(), NOTE_EDIT_LINE_WIDTH + 2 ) ); p.drawPoints( editHandles );