forked from qt-creator/qt-creator
Editor: fix continuosly repainting partially visible annotations
Task-number: QTCREATORBUG-20422 Change-Id: Id171d8cb3022dd6e345e55fdf029c445bc42c382 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4131,7 +4131,7 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data,
|
||||
QRect updateRect(lineRect.toRect().topRight(), boundingRect.toRect().bottomRight());
|
||||
updateRect.setLeft(qBound(0, updateRect.left(), q->viewport()->width() - 1));
|
||||
updateRect.setRight(qBound(0, updateRect.right(), q->viewport()->width() - 1));
|
||||
if (!updateRect.isEmpty() && !data.eventRect.contains(updateRect))
|
||||
if (!updateRect.isEmpty() && !data.eventRect.contains(q->viewport()->rect() & updateRect))
|
||||
q->viewport()->update(updateRect);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user