forked from qt-creator/qt-creator
TextEditor: Fix determination of maximum width
Width is not zero-based. Task-number: QTCREATORBUG-19091 Change-Id: I32134727bed204f6bb10748cd067a775f673b89b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
David Schulz
parent
4977c91544
commit
13717262a1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user