diff options
author | David Schulz <david.schulz@qt.io> | 2018-05-28 14:46:36 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2018-05-29 04:50:12 +0000 |
commit | 3e618cbf76f1477f85ea6966e349c9acb924c9b6 (patch) | |
tree | 6fb7987323847b67315b0b474ab318a83991b45a | |
parent | c1c57f0c383f88451d1b6c8fe83caa6f2f071048 (diff) | |
download | qt-creator-3e618cbf76f1477f85ea6966e349c9acb924c9b6.tar.gz |
Editor: fix continuosly repainting partially visible annotations
Task-number: QTCREATORBUG-20422
Change-Id: Id171d8cb3022dd6e345e55fdf029c445bc42c382
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index ab10ab7d0b..9ef886f297 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -4131,7 +4131,7 @@ void TextEditorWidgetPrivate::updateLineAnnotation(const PaintEventData &data, 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(updateRect)) + if (!updateRect.isEmpty() && !data.eventRect.contains(q->viewport()->rect() & updateRect)) q->viewport()->update(updateRect); } |