Fix minor ifdefed-out block drawing issue

When drawing the background for an ifdefed-out block, expand
to the end of the visible viewport, even when scrolled
horizontally to the right.
This commit is contained in:
mae
2010-04-13 14:37:54 +02:00
parent 994ee7b6f4
commit e9be9a0d57

View File

@@ -2569,7 +2569,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
if (TextEditDocumentLayout::ifdefedOut(block)) {
QRectF rr = r;
rr.setWidth(viewport()->width());
rr.setRight(viewportRect.width() - offset.x());
if (lineX > 0)
rr.setRight(qMin(lineX, rr.right()));
painter.fillRect(rr, d->m_ifdefedOutFormat.background());