Commit 13717262 authored by Christian Stenger's avatar Christian Stenger Committed by David Schulz

TextEditor: Fix determination of maximum width

Width is not zero-based.

Task-number: QTCREATORBUG-19091
Change-Id: I32134727bed204f6bb10748cd067a775f673b89b
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 4977c915
......@@ -3921,8 +3921,8 @@ void TextEditorWidgetPrivate::drawLineAnnotation(
}
QRect updateRect(lineRect.toRect().topRight(), boundingRect.toRect().bottomRight());
updateRect.setLeft(qBound(0, updateRect.left(), q->viewport()->width()));
updateRect.setRight(qBound(0, updateRect.right(), q->viewport()->width()));
updateRect.setLeft(qBound(0, updateRect.left(), q->viewport()->width() - 1));
updateRect.setRight(qBound(0, updateRect.right(), q->viewport()->width() - 1));
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