Message info
 
To:kde-commits@kde.org From:Dominik Haumann Subject:[kate] part/render: backup render hints to maintain state Date:Sun, 18 Mar 2012 16:35:52 +0100 (CET)
 

Git commit a0fa4bed24f028ab682d5d0d08fa157d47fc2366 by Dominik Haumann.
Committed on 18/03/2012 at 16:33.
Pushed by dhaumann into branch 'master'.

backup render hints to maintain state

M +4 -0 part/render/katerenderer.cpp

http://commits.kde.org/kate/a0fa4bed24f028ab682d5d0d08fa157d47fc2366

diff --git a/part/render/katerenderer.cpp b/part/render/katerenderer.cpp
index 0b30591..1dc8497 100644
--- a/part/render/katerenderer.cpp
+++ b/part/render/katerenderer.cpp
@@ -727,6 +727,7 @@ void KateRenderer::paintTextLine(QPainter& paint, KateLineLayoutPtr range, int x

// Draws the dashed underline at the start of a folded block of text.
if (range->startsInvisibleBlock()) {
+ const QPainter::RenderHints backupRenderHints = paint.renderHints();
paint.setRenderHint(QPainter::Antialiasing, false);
QPen pen(config()->wordWrapMarkerColor());
pen.setCosmetic(true);
@@ -734,15 +735,18 @@ void KateRenderer::paintTextLine(QPainter& paint, KateLineLayoutPtr range, int x
pen.setDashOffset(xStart);
paint.setPen(pen);
paint.drawLine(0, (lineHeight() * range->viewLineCount()) - 1, xEnd - xStart, (lineHeight() * range->viewLineCount()) - 1);
+ paint.setRenderHints(backupRenderHints);
}

// show word wrap marker if desirable
if ((!isPrinterFriendly()) && config()->wordWrapMarker() && QFontInfo(config()->font()).fixedPitch())
{
+ const QPainter::RenderHints backupRenderHints = paint.renderHints();
paint.setRenderHint(QPainter::Antialiasing, false);
paint.setPen( config()->wordWrapMarkerColor() );
int _x = m_doc->config()->wordWrapAt() * fm.width('x') - xStart;
paint.drawLine( _x,0,_x,lineHeight() );
+ paint.setRenderHints(backupRenderHints);
}
}