forked from qt-creator/qt-creator
TextEditor: skip painting refactor markers of invisible blocks
Task-number: QTCREATORBUG-21032 Change-Id: I43a91f6c4237bb923c09391bbc436bd617b4512d Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -67,6 +67,9 @@ RefactorMarker RefactorOverlay::markerAt(const QPoint &pos) const
|
|||||||
|
|
||||||
void RefactorOverlay::paintMarker(const RefactorMarker& marker, QPainter *painter, const QRect &clip)
|
void RefactorOverlay::paintMarker(const RefactorMarker& marker, QPainter *painter, const QRect &clip)
|
||||||
{
|
{
|
||||||
|
if (!marker.cursor.block().isVisible())
|
||||||
|
return; // block containing marker not visible
|
||||||
|
|
||||||
const QPointF offset = m_editor->contentOffset();
|
const QPointF offset = m_editor->contentOffset();
|
||||||
const QRectF geometry = m_editor->blockBoundingGeometry(marker.cursor.block()).translated(offset);
|
const QRectF geometry = m_editor->blockBoundingGeometry(marker.cursor.block()).translated(offset);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user