From b5457750f26e49e2875672c0316d4964ac0dbbaa Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 11 Mar 2022 14:09:50 +0100 Subject: [PATCH] Editor: do not request updates for the complete annotation area ... inside the paint event. We should always make sure to call an explicit update when we add, remove or change annotations via text marks. Task-number: QTCREATORBUG-26812 Change-Id: I5afbdad5e1916e99665b5cb1b1cd2a0bbf7335c3 Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 27e2bc36b92..9ea3e7e34ed 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4030,12 +4030,6 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data, offset = itemOffset / 2; m_annotationRects[data.block.blockNumber()].append({boundingRect, mark}); } - - 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(q->viewport()->rect() & updateRect)) - q->viewport()->update(updateRect); } QColor blendRightMarginColor(const FontSettings &settings, bool areaColor)