From 9ff882d09d169e16e0b58b32d279d919968a7329 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Mon, 6 May 2019 15:36:38 +0900 Subject: [PATCH] Fix invisible note editing handles when a note has detuning info Fixes a regression in 32df2d7fbad48c97322fdd1ebdffd0b5fee8fff8, the clipping area was restored in a wrong place. Also, a wrong value was used while restoring. --- src/gui/editors/PianoRoll.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 18995bfde..5b306a783 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -3077,12 +3077,12 @@ void PianoRoll::paintEvent(QPaintEvent * pe ) drawDetuningInfo( p, note, x + WHITE_KEY_WIDTH, y_base - key * KEY_LINE_HEIGHT ); + p.setClipRect(WHITE_KEY_WIDTH, PR_TOP_MARGIN, + width() - WHITE_KEY_WIDTH, + height() - PR_TOP_MARGIN); } } - 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 );