forked from qt-creator/qt-creator
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 <christian.stenger@qt.io>
This commit is contained in:
@@ -4030,12 +4030,6 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data,
|
|||||||
offset = itemOffset / 2;
|
offset = itemOffset / 2;
|
||||||
m_annotationRects[data.block.blockNumber()].append({boundingRect, mark});
|
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)
|
QColor blendRightMarginColor(const FontSettings &settings, bool areaColor)
|
||||||
|
Reference in New Issue
Block a user