diff options
author | David Schulz <david.schulz@qt.io> | 2022-03-17 07:09:51 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-03-17 11:03:00 +0000 |
commit | 2d3d66c115bdc6821e73de112622b8961c94a9d7 (patch) | |
tree | 7a0c463b7a2313f0d135c669c3c9fac5ab0d2ddb /src/plugins/texteditor/texteditoroverlay.h | |
parent | b822a9462eed10f3b855e8c17c6467c23b5b7d80 (diff) |
Editor: limit painter path calculation for overlay selections
Only calculate a painter path if it is inside the paint event rect.
Task-number: QTCREATORBUG-26812
Change-Id: I9e7026b70251347fe8c38fc5b9278de943786956
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditoroverlay.h')
-rw-r--r-- | src/plugins/texteditor/texteditoroverlay.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/texteditor/texteditoroverlay.h b/src/plugins/texteditor/texteditoroverlay.h index d87a0fe7aa..4c3811b895 100644 --- a/src/plugins/texteditor/texteditoroverlay.h +++ b/src/plugins/texteditor/texteditoroverlay.h @@ -100,8 +100,8 @@ protected: private: QPainterPath createSelectionPath(const QTextCursor &begin, const QTextCursor &end, const QRect& clip); - void paintSelection(QPainter *painter, const OverlaySelection &selection); - void fillSelection(QPainter *painter, const OverlaySelection &selection, const QColor &color); + void paintSelection(QPainter *painter, const OverlaySelection &selection, const QRect &clip); + void fillSelection(QPainter *painter, const OverlaySelection &selection, const QColor &color, const QRect &clip); bool m_visible; bool m_alpha; |