diff options
author | Louai Al-Khanji <louai.al-khanji@digia.com> | 2014-08-18 09:44:07 +0300 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2014-08-18 10:14:15 +0300 |
commit | 3574eed7f97e126459cdbd0ca63690e059f1e8d0 (patch) | |
tree | 88c0284b37ff13dad585b2b7baa218c09734831e /softwarecontext/glyphnode.cpp | |
parent | 4cf478605e9d90d0bfaeec1f8e78cfdc71be402b (diff) |
Save and restore changed QPainter properties
Change-Id: I67c604aa43d03207fd18fb41f54b445bd6bb34d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'softwarecontext/glyphnode.cpp')
-rw-r--r-- | softwarecontext/glyphnode.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/softwarecontext/glyphnode.cpp b/softwarecontext/glyphnode.cpp index eae8b626cb..ecb8b3f6dc 100644 --- a/softwarecontext/glyphnode.cpp +++ b/softwarecontext/glyphnode.cpp @@ -64,6 +64,9 @@ void GlyphNode::update() void GlyphNode::paint(QPainter *painter) { + QPen originalPen = painter->pen(); + QBrush originalBrush = painter->brush(); + painter->setBrush(QBrush()); QPointF pos = m_position - QPointF(0, m_glyphRun.rawFont().ascent()); @@ -88,4 +91,7 @@ void GlyphNode::paint(QPainter *painter) painter->setPen(m_color); painter->drawGlyphRun(pos, m_glyphRun); + + painter->setPen(originalPen); + painter->setBrush(originalBrush); } |