Commit 79bdd7e1 authored by David Schulz's avatar David Schulz

TextEditor: Fix update loop for annotations

Task-number: QTCREATORBUG-19091
Change-Id: I5f699747df10e25d412b2eec4620c3b51ad628e3
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent bf464875
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment