forked from qt-creator/qt-creator
TextEditor: Fix update loop for annotations
Task-number: QTCREATORBUG-19091 Change-Id: I5f699747df10e25d412b2eec4620c3b51ad628e3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3921,7 +3921,8 @@ void TextEditorWidgetPrivate::drawLineAnnotation(
|
||||
}
|
||||
|
||||
QRect updateRect(lineRect.toRect().topRight(), boundingRect.toRect().bottomRight());
|
||||
updateRect.setLeft(qMax(0, updateRect.left()));
|
||||
updateRect.setLeft(qBound(0, updateRect.left(), q->viewport()->width()));
|
||||
updateRect.setRight(qBound(0, updateRect.right(), q->viewport()->width()));
|
||||
if (!updateRect.isEmpty() && !eventRect.contains(updateRect))
|
||||
q->viewport()->update(updateRect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user