summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-17 20:18:14 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-18 10:14:27 -0700
commitd3c0a723b82337fcf2bd0e129d3a6855c90e4825 (patch)
tree067372639fc6f17fdd82717de2efc6a581725106 /qt-ui/modeldelegates.cpp
parent774a785a99c8ec2910c346de0ad40eb65f1948f6 (diff)
downloadsubsurface-d3c0a723b82337fcf2bd0e129d3a6855c90e4825.tar.gz
Save / Restore the QPainter before operations.
I don't know if this fixes anything, but it is asked of us to do that by the Qt docs. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r--qt-ui/modeldelegates.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index c0b0f4dda..b11c4614d 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -353,6 +353,7 @@ void ProfilePrintDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
const int row = index.row();
const int col = index.column();
+ painter->save();
// grid color
painter->setPen(QPen(QColor(0xff999999)));
// horizontal lines
@@ -366,6 +367,7 @@ void ProfilePrintDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
if (col == 4 || (col == 0 && row > 5))
painter->drawLine(rect.topRight(), rect.bottomRight());
}
+ painter->restore();
QStyledItemDelegate::paint(painter, option, index);
}