Fix invisible note editing handles when a note has detuning info

Fixes a regression in 32df2d7fba,
the clipping area was restored in a wrong place.
Also, a wrong value was used while restoring.
This commit is contained in:
Hyunjin Song
2019-05-06 15:36:38 +09:00
parent 8f4757ee3b
commit 9ff882d09d

View File

@@ -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 );